Skip to content

fix: OpenAI decorators: Optional aiConnectionName param added #283

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 1 commit into from
May 16, 2025

Conversation

manvkaur
Copy link
Contributor

This pull request introduces support for specifying an ai_connection_name parameter across multiple methods and classes in the azure/functions/decorators module. This parameter allows users to configure AI service connectivity settings, providing flexibility for both Azure OpenAI and non-Azure OpenAI services. The changes also include updates to the corresponding test cases to validate the new functionality.

Enhancements to AI Service Configuration:

  • Added ai_connection_name Parameter:
    • Introduced the optional ai_connection_name parameter in several methods (text_completion_input, assistant_post_input, embeddings_input, semantic_search_input, and embeddings_store_output) within azure/functions/decorators/function_app.py. This parameter enables users to specify configuration settings for AI service connectivity, with fallback options to environment variables for both Azure OpenAI and non-Azure OpenAI services. [1] [2] [3] [4] [5]
    • Updated the corresponding __init__ methods in azure/functions/decorators/openai.py to include the ai_connection_name parameter, ensuring it is properly stored and utilized in various AI-related operations. [1] [2] [3] [4] [5]

Test Coverage Updates:

  • Enhanced Unit Tests:
    • Updated test cases in tests/decorators/test_openai.py to include scenarios validating the ai_connection_name parameter for various input types, ensuring the parameter is correctly passed and serialized. [1] [2] [3]

These changes improve the flexibility and configurability of AI service integrations in the Azure Functions decorators, while maintaining robust test coverage for the new functionality.

@manvkaur manvkaur changed the title OpenAI decorators: Optional aiConnectionName param added fix: OpenAI decorators: Optional aiConnectionName param added May 16, 2025
@manvkaur manvkaur marked this pull request as ready for review May 16, 2025 18:31
@manvkaur manvkaur merged commit e981117 into Azure:dev May 16, 2025
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants