Skip to main content

answer.generate

Generate AI-powered answers with RAG (retrieve from a text namespace) or direct LLM calls. Configure the LLM provider (Ollama, OpenAI, or Cohere) with moorcheh configure before use. Default Ollama LLM: qwen2.5 (~7B). Use ai_model="qwen2.5:1.5b" for the 1.5B option. See Embedding providers - LLM models.
API: POST /answer — see Generate AI Answer

Search Mode (RAG)

Direct AI Mode

Use an empty namespace string:

With chat history

Structured output

Parameters

Response