This guide covers the optional features and their configuration in Morphic.
Follow the detailed setup guide at Building your own RAG chatbot with Upstash
.env.local:NEXT_PUBLIC_ENABLE_SAVE_CHAT_HISTORY=true
USE_LOCAL_REDIS=false
UPSTASH_REDIS_REST_URL=[YOUR_UPSTASH_REDIS_REST_URL]
UPSTASH_REDIS_REST_TOKEN=[YOUR_UPSTASH_REDIS_REST_TOKEN]
.env.local:NEXT_PUBLIC_ENABLE_SAVE_CHAT_HISTORY=true
USE_LOCAL_REDIS=true
LOCAL_REDIS_URL=redis://localhost:6379
SearXNG can be used as an alternative search backend with advanced search capabilities.
SEARCH_API=searxng
SEARXNG_API_URL=http://localhost:8080
SEARXNG_SECRET="" # generate with: openssl rand -base64 32
searxng-settings.yml: Contains main configuration for SearXNGsearxng-limiter.toml: Configures rate limiting and bot detection.env.local:# SearXNG Base Configuration
SEARXNG_PORT=8080
SEARXNG_BIND_ADDRESS=0.0.0.0
SEARXNG_IMAGE_PROXY=true
# Search Behavior
SEARXNG_DEFAULT_DEPTH=basic # Set to 'basic' or 'advanced'
SEARXNG_MAX_RESULTS=50 # Maximum number of results to return
SEARXNG_ENGINES=google,bing,duckduckgo,wikipedia # Comma-separated list of search engines
SEARXNG_TIME_RANGE=None # Time range: day, week, month, year, or None
SEARXNG_SAFESEARCH=0 # 0: off, 1: moderate, 2: strict
# Rate Limiting
SEARXNG_LIMITER=false # Enable to limit requests per IP
SEARXNG_DEFAULT_DEPTH: Controls search depth
basic: Standard searchadvanced: Includes content crawling and relevance scoringSEARXNG_MAX_RESULTS: Maximum results to returnSEARXNG_CRAWL_MULTIPLIER: In advanced mode, determines how many results to crawl
MAX_RESULTS=10 and CRAWL_MULTIPLIER=4, up to 40 results will be crawledYou can modify searxng-settings.yml to:
Example of disabling specific engines:
engines:
- name: wikidata
disabled: true
For detailed configuration options, refer to the SearXNG documentation
searxng-settings.ymlsearxng-limiter.tomldocker-compose logs searxng
Models are configured in public/config/models.json. Each model requires its corresponding API key to be set in the environment variables.
Note: Ollama models are discovered dynamically at runtime when an Ollama server is available. Only models that expose the
toolscapability will appear in Morphic, so you no longer need to keep placeholder Ollama entries inmodels.json.
The models.json file contains an array of model configurations with the following structure:
{
"models": [
{
"id": "model-id",
"name": "Model Name",
"provider": "Provider Name",
"providerId": "provider-id",
"enabled": true,
"toolCallType": "native|manual",
"toolCallModel": "tool-call-model-id" // optional, only needed if toolCallType is "manual" and you need to specify a different model for tool calls
}
]
}
GOOGLE_GENERATIVE_AI_API_KEY=[YOUR_API_KEY]
ANTHROPIC_API_KEY=[YOUR_API_KEY]
GROQ_API_KEY=[YOUR_API_KEY]
OLLAMA_BASE_URL=http://localhost:11434
When this variable is set, Morphic will automatically discover Ollama models that advertise the tools capability. Models without this capability are ignored, and no static configuration in models.json is required unless you need to override specific settings.
AZURE_API_KEY=[YOUR_API_KEY]
AZURE_RESOURCE_NAME=[YOUR_RESOURCE_NAME]
DEEPSEEK_API_KEY=[YOUR_API_KEY]
FIREWORKS_API_KEY=[YOUR_API_KEY]
XAI_API_KEY=[YOUR_XAI_API_KEY]
OPENAI_COMPATIBLE_API_KEY=[YOUR_API_KEY]
OPENAI_COMPATIBLE_API_BASE_URL=[YOUR_API_BASE_URL]
NEXT_PUBLIC_ENABLE_SHARE=true
SERPER_API_KEY=[YOUR_API_KEY]
JINA_API_KEY=[YOUR_API_KEY]