问答

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

post/knowledge-chat/{session_id}

Request

  • Base URL
    /api/v1 (relative, and the document was published on a file host, not at the API’s origin)
  • URL
    /api/v1/knowledge-chat/{session_id}
  • Auth
    • API key in header Authorization
    • or API key in header X-API-Key

Path parameters

session_idstring required

会话ID

Query parameters

resource_urls'handle' | 'public'

文件引用形式,public 返回可加载直链

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)

agent_source_tenant_idinteger

Optional disambiguator; backend still verifies the share relation

assistant_access'read_only' | 'confirm' | 'auto_write'
attachment_idsstring[]

Pre-uploaded session-scoped document IDs

channelstring

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

disable_titleboolean

Whether to disable auto title generation

knowledge_base_idsstring[]

Selected knowledge base ID for this request

knowledge_idsstring[]

Selected knowledge ID for this request

local_browser_enabledboolean

Browser source

mcp_service_idsstring[]

Per-request MCP services selected via @mention

querystring

Query text; may be empty only when an image or file is attached

reasoning_effortstring

ReasoningEffort overrides thinking for this request; empty inherits the agent configuration.

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