feat: add request parameter to generate_suggestions endpoint for enhanced context

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
JeffJiang 2026-04-26 12:36:05 +08:00
parent 98a5b34f76
commit 3b71e2d377

View File

@ -100,7 +100,7 @@ def _format_conversation(messages: list[SuggestionMessage]) -> str:
description="Generate short follow-up questions a user might ask next, based on recent conversation context.",
)
@require_permission("threads", "read", owner_check=True)
async def generate_suggestions(thread_id: str, body: SuggestionsRequest) -> SuggestionsResponse:
async def generate_suggestions(thread_id: str, body: SuggestionsRequest, request: Request) -> SuggestionsResponse:
if not body.messages:
return SuggestionsResponse(suggestions=[])