mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-06-29 15:31:05 +08:00
Fix: add legacy agent completion API compatibility (#14582)
### What problem does this PR solve? add legacy agent completion API compatibility ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@@ -4486,15 +4486,8 @@ Asks a specified agent a question to start an AI-powered conversation.
|
||||
|
||||
Uses a single completion endpoint for all agent conversations.
|
||||
|
||||
- Standard mode: send `agent_id` with `query`.
|
||||
- OpenAI-compatible mode: send the same endpoint with `"openai-compatible": true`.
|
||||
|
||||
:::tip NOTE
|
||||
|
||||
- Older agent completion routes have been removed. Use only `/api/v1/agents/chat/completion`.
|
||||
- In standard streaming mode, not all responses include a reference, as this depends on the workflow result.
|
||||
- In streaming mode, the server terminates the stream with `[DONE]`.
|
||||
|
||||
:::caution DEPRECATED
|
||||
The previous endpoint `POST /api/v1/agents/{agent_id}/completions` is deprecated. Please use `POST /api/v1/agents/chat/completion` instead.
|
||||
:::
|
||||
|
||||
#### Request
|
||||
|
||||
Reference in New Issue
Block a user