-
Notifications
You must be signed in to change notification settings - Fork 68
fix: update decorators for openai extension #280
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 tasks
hallvictoria
reviewed
May 6, 2025
hallvictoria
reviewed
May 6, 2025
hallvictoria
reviewed
May 6, 2025
hallvictoria
reviewed
May 6, 2025
hallvictoria
reviewed
May 6, 2025
hallvictoria
reviewed
May 6, 2025
hallvictoria
reviewed
May 6, 2025
hallvictoria
reviewed
May 6, 2025
hallvictoria
reviewed
May 6, 2025
hallvictoria
reviewed
May 6, 2025
hallvictoria
reviewed
May 6, 2025
hallvictoria
reviewed
May 6, 2025
gavin-aguiar
reviewed
May 7, 2025
gavin-aguiar
reviewed
May 8, 2025
hallvictoria
approved these changes
May 9, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request refactors and enhances the Azure Functions decorators for OpenAI integrations. The changes focus on improving parameter clarity, introducing additional configuration options, and replacing ambiguous parameter names. Key updates include a breaking change with the replacement of the
model
parameter with more specific alternatives (chat_model
,embeddings_model
), the addition of new parameters for fine-tuning model behavior, and updates to method signatures and documentation.Refactoring and Parameter Updates:
Replaced the generic
model
parameter withchat_model
orembeddings_model
across methods for improved clarity and specificity. Default values for these parameters were updated to align with their respective APIs (e.g., "gpt-3.5-turbo" forchat_model
and "text-embedding-ada-002" forembeddings_model
). (F22bb082L3217R3217, F22bb082L3455R3510, azure/functions/decorators/function_app.pyL3479-R3527)Renamed
connection_name
tosearch_connection_name
orstore_connection_name
in relevant methods to better reflect their purpose in semantic search and embeddings storage. [1] [2]New Parameters for Model Configuration:
temperature
,top_p
,max_tokens
, andis_reasoning_model
parameters in methods liketext_completion_input
,assistant_post_input
, andsemantic_search_input
. These parameters enable finer control over model behavior, including sampling randomness and reasoning capabilities. (F22bb082L3217R3217, F22bb082L3376R3435, azure/functions/decorators/function_app.pyL3479-R3527)Documentation and Type Enhancements:
Codebase Simplification:
model
parameters and their associated logic from method signatures and class initializations to streamline the codebase. [1] [2]Import Adjustments:
Union
to imports inazure/functions/decorators/openai.py
to support the new parameter type definitions.Related extension PR - Azure/azure-functions-openai-extension#150