mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-07 03:48:44 +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:
@@ -383,7 +383,7 @@ def delete_all_agent_sessions(auth, agent_id, *, page_size=1000):
|
||||
|
||||
|
||||
def agent_completions(auth, agent_id, payload=None):
|
||||
url = f"{HOST_ADDRESS}{AGENT_API_URL}/chat/completion"
|
||||
url = f"{HOST_ADDRESS}{AGENT_API_URL}/chat/completions"
|
||||
body = {"agent_id": agent_id}
|
||||
if payload:
|
||||
body.update(payload)
|
||||
|
||||
@@ -160,7 +160,7 @@ def test_session_module_streaming_and_helper_paths_unit(monkeypatch):
|
||||
assert calls[0][2]["session_id"] == "session-chat"
|
||||
assert calls[0][2]["temperature"] == 0.2
|
||||
assert calls[0][3] is True
|
||||
assert calls[1][1] == "/agents/chat/completion"
|
||||
assert calls[1][1] == "/agents/chat/completions"
|
||||
assert calls[1][2]["agent_id"] == "agent-1"
|
||||
assert calls[1][2]["query"] == "hello agent"
|
||||
assert calls[1][2]["session_id"] == "session-agent"
|
||||
|
||||
Reference in New Issue
Block a user