问答

知识问答

基于知识库的问答(使用LLM总结),支持SSE流式响应

post/sessions/{session_id}/knowledge-qa

Path parameters

session_idstring required

会话ID

Request body

agent_enabledboolean

Whether agent mode is enabled for this request

agent_idstring

Selected custom agent ID (backend resolves shared agent and its workspace from share relation)

channelstring

Source channel: "web", "api", "im", etc.

disable_titleboolean

Whether to disable auto title generation

enable_memoryboolean

EnableMemory is the per-request override for the memory feature. Pointer + omitempty so the request can distinguish three states: nil = client did not specify; backend falls back to the calling user's persisted preference (user.preferences.enable_memory), defaulting to false if that's also unset. This is the path used by the normal logged-in chat UI now that the toggle is stored server-side per user. *true / *false = explicit override. Embedded mode forces *false so a user's personal memory setting doesn't leak into a widget context; older clients that still send a literal bool also land here (back-compat).

knowledge_base_idsstring[]

Selected knowledge base ID for this request

knowledge_idsstring[]

Selected knowledge ID for this request

mcp_service_idsstring[]

Per-request MCP services selected via @mention

querystring required

Query text for knowledge base search

skill_namesstring[]

Per-request Skills selected via @mention

summary_model_idstring

Optional summary model ID for this request (overrides session default)

tag_idsstring[]

@mentioned tag IDs (display/debug; scoped via MentionedItems)

web_search_enabledboolean

Whether web search is enabled for this request

Response

问答结果(SSE流)

Changes