mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-27 10:52:03 +08:00
Refactor: completion -> completions (#14584)
### What problem does this PR solve? Keep only /completions, deprecated /completion ### Type of change - [x] Refactoring
This commit is contained in:
@@ -403,14 +403,14 @@ async def deprecated_file_upload_info():
|
||||
@add_tenant_id_to_kwargs
|
||||
async def deprecated_agent_completions(agent_id, tenant_id=None):
|
||||
"""
|
||||
Deprecated: Use POST /api/v1/agents/chat/completion instead.
|
||||
Deprecated: Use POST /api/v1/agents/chat/completions instead.
|
||||
|
||||
Old path: POST /api/v1/agents/{agent_id}/completions
|
||||
New path: POST /api/v1/agents/chat/completion
|
||||
New path: POST /api/v1/agents/chat/completions
|
||||
"""
|
||||
logging.warning(
|
||||
"API endpoint /api/v1/agents/%s/completions is deprecated. "
|
||||
"Please use /api/v1/agents/chat/completion instead.",
|
||||
"Please use /api/v1/agents/chat/completions instead.",
|
||||
agent_id,
|
||||
)
|
||||
return await agent_api.agent_chat_completion(tenant_id=tenant_id, agent_id=agent_id)
|
||||
|
||||
Reference in New Issue
Block a user