-
Notifications
You must be signed in to change notification settings - Fork 9.1k
Refactor: completion -> completions #14584
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -174,6 +174,7 @@ def delete_search(search_id): | |||||||
|
|
||||||||
|
|
||||||||
| @manager.route("/searches/<search_id>/completion", methods=["POST"]) # noqa: F821 | ||||||||
| @manager.route("/searches/<search_id>/completions", methods=["POST"]) # noqa: F821 | ||||||||
|
Comment on lines
176
to
+177
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Primary API still exposes deprecated singular Suggested diff-@manager.route("/searches/<search_id>/completion", methods=["POST"]) # noqa: F821
`@manager.route`("/searches/<search_id>/completions", methods=["POST"]) # noqa: F821
`@login_required`
`@validate_request`("question")
async def completion(search_id):📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||
| @login_required | ||||||||
| @validate_request("question") | ||||||||
| async def completion(search_id): | ||||||||
|
|
||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deprecated singular agent route is still first-class in the main API.
Line 848 keeps
/agents/chat/completionactive without deprecation handling. That conflicts with the objective to keep only/completions. Recommend removing the singular decorator from this handler and serving old-path compatibility only via backward-compat routes with warnings.Suggested diff
-@manager.route("/agents/chat/completion", methods=["POST"]) # noqa: F821 `@manager.route`("/agents/chat/completions", methods=["POST"]) # noqa: F821 `@login_required` `@add_tenant_id_to_kwargs` async def agent_chat_completion(tenant_id, agent_id=None):🤖 Prompt for AI Agents