Skip to main content

SDK - answer_text()

Embeds the query locally, then calls POST /answer. LLM model: qwen2.5:0.5b-instruct (via Ollama on the host).
When no passages match the query, the server returns I don’t have enough information to answer that question. with context_count: 0 and does not call Ollama.

Optional prompts and history

SDK - answer() with precomputed vector

If you already have a query embedding:

HTTP client

You must supply both query and query_vector:

Requirements

  • Store must contain uploaded documents (text or vector mode).
  • Ollama must be running with qwen2.5:0.5b-instruct (use moorcheh-edge up --with-llm on Linux).
For token-by-token output, use answer_stream() with MoorchehEdgeApiClient. See API: Answer and CLI: answer.