Closed Bryan-Roe closed 3 months ago
This pull request adds support for function choice behavior and auto-invoking functions in GoogleAI and VertexAI chat completions. It includes new utility functions, test cases, and updates to existing methods to handle function calls. Additionally, it introduces fields for tools and tool_config in chat prompt execution settings and adds a region parameter to VertexAI services.
Files | Changes |
---|---|
python/semantic_kernel/connectors/ai/google/google_ai/services/google_ai_chat_completion.py python/semantic_kernel/connectors/ai/google/vertex_ai/services/vertex_ai_chat_completion.py |
Added support for function choice behavior and auto-invoking functions in chat and streaming chat completions. |
python/semantic_kernel/connectors/ai/google/vertex_ai/services/utils.py python/semantic_kernel/connectors/ai/google/google_ai/services/utils.py |
Added utility functions for handling function choice behavior and formatting function calls. |
python/tests/unit/connectors/google/google_ai/services/test_google_ai_chat_completion.py python/tests/unit/connectors/google/vertex_ai/services/test_vertex_ai_chat_completion.py |
Added new test cases for function choice behavior and updated existing test cases to include additional parameters. |
python/semantic_kernel/connectors/ai/google/vertex_ai/vertex_ai_prompt_execution_settings.py python/semantic_kernel/connectors/ai/google/google_ai/google_ai_prompt_execution_settings.py |
Added fields for tools and tool_config in chat prompt execution settings. |
python/semantic_kernel/connectors/ai/google/vertex_ai/services/vertex_ai_text_completion.py python/semantic_kernel/connectors/ai/google/vertex_ai/services/vertex_ai_text_embedding.py |
Added region parameter and updated vertexai.init calls to include region. |
Motivation and Context
Description
Contribution Checklist
Summary by Sourcery
Introduce function choice behavior and enhance chat completion methods for GoogleAI and VertexAI connectors, including support for streaming completions and tool calls. Add new tests to verify the functionality and update prompt execution settings to handle tools and tool configurations.
New Features:
Enhancements:
Tests: