Skip to content

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