-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Add support for reasoning models and token usage display #2448
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
Conversation
@@ -33,6 +33,7 @@ def __init__( | |||
query_language: str, | |||
query_speller: str, | |||
prompt_manager: PromptManager, | |||
reasoning_effort: Optional[str] = None, |
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.
Is there a str enum from openai library for reasoning effort? Would it be good to use that if so?
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.
They have a literal for it:
Optional[ChatCompletionReasoningEffort]
But its not clear we should use it for what comes from the frontend.
@@ -142,6 +148,8 @@ | |||
"Enables the Azure AI Search semantic ranker, a model that re-ranks search results based on semantic similarity to the user's query.", | |||
"useQueryRewriting": | |||
"Enables Azure AI Search query rewriting, a process that modifies the user's query to improve search results. Requires semantic ranker to be enabled.", | |||
"reasoningEffort": |
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.
Please translate for other files. (Perhaps we need a script for this..but its not that often yet)
Purpose
Does this introduce a breaking change?
When developers merge from main and run the server, azd up, or azd deploy, will this produce an error?
If you're not sure, try it out on an old environment.
Does this require changes to learn.microsoft.com docs?
This repository is referenced by this tutorial
which includes deployment, settings and usage instructions. If text or screenshot need to change in the tutorial,
check the box below and notify the tutorial author. A Microsoft employee can do this for you if you're an external contributor.
Type of change
Code quality checklist
See CONTRIBUTING.md for more details.
python -m pytest
).python -m pytest --cov
to verify 100% coverage of added linespython -m mypy
to check for type errorsruff
andblack
manually on my code.