From 42a801f298fe0880b4a7fb22ada8fdfc1fcd350e Mon Sep 17 00:00:00 2001 From: Jack Gerrits Date: Fri, 10 Jan 2025 08:51:54 -0500 Subject: [PATCH] Fix provider string for AzureTokenProvider --- .../packages/autogen-ext/src/autogen_ext/auth/azure/__init__.py | 2 +- .../autogen-ext/src/autogen_ext/models/openai/_openai_client.py | 2 +- python/packages/autogen-magentic-one/README.md | 2 +- .../core_async_human_in_the_loop/model_config_template.json | 2 +- python/samples/core_chess_game/model_config_template.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/python/packages/autogen-ext/src/autogen_ext/auth/azure/__init__.py b/python/packages/autogen-ext/src/autogen_ext/auth/azure/__init__.py index 607a3e01c3a4..96732a4194d8 100644 --- a/python/packages/autogen-ext/src/autogen_ext/auth/azure/__init__.py +++ b/python/packages/autogen-ext/src/autogen_ext/auth/azure/__init__.py @@ -16,7 +16,7 @@ class TokenProviderConfig(BaseModel): class AzureTokenProvider(Component[TokenProviderConfig]): component_type = "token_provider" component_config_schema = TokenProviderConfig - component_provider_override = "autogen_ext.models.openai.AzureTokenProvider" + component_provider_override = "autogen_ext.auth.azure.AzureTokenProvider" def __init__(self, credential: TokenProvider, *scopes: str): self.credential = credential diff --git a/python/packages/autogen-ext/src/autogen_ext/models/openai/_openai_client.py b/python/packages/autogen-ext/src/autogen_ext/models/openai/_openai_client.py index 5b9f51129a88..befb83746063 100644 --- a/python/packages/autogen-ext/src/autogen_ext/models/openai/_openai_client.py +++ b/python/packages/autogen-ext/src/autogen_ext/models/openai/_openai_client.py @@ -1102,7 +1102,7 @@ class AzureOpenAIChatCompletionClient( "azure_deployment": "{your-azure-deployment}", "api_version": "2024-06-01", "azure_ad_token_provider": { - "provider": "autogen_ext.models.openai.AzureTokenProvider", + "provider": "autogen_ext.auth.azure.AzureTokenProvider", "config": { "provider_kind": "DefaultAzureCredential", "scopes": ["https://cognitiveservices.azure.com/.default"], diff --git a/python/packages/autogen-magentic-one/README.md b/python/packages/autogen-magentic-one/README.md index a0573df8c52a..d6aef754204a 100644 --- a/python/packages/autogen-magentic-one/README.md +++ b/python/packages/autogen-magentic-one/README.md @@ -143,7 +143,7 @@ To configure for Azure OpenAI service, use the following config: "azure_deployment": "{your-azure-deployment}", "api_version": "2024-06-01", "azure_ad_token_provider": { - "provider": "autogen_ext.models.openai.AzureTokenProvider", + "provider": "autogen_ext.auth.azure.AzureTokenProvider", "config": { "provider_kind": "DefaultAzureCredential", "scopes": [ diff --git a/python/samples/core_async_human_in_the_loop/model_config_template.json b/python/samples/core_async_human_in_the_loop/model_config_template.json index bfa6913900ae..a66457f3b8e3 100644 --- a/python/samples/core_async_human_in_the_loop/model_config_template.json +++ b/python/samples/core_async_human_in_the_loop/model_config_template.json @@ -7,7 +7,7 @@ // "azure_deployment": "{your-azure-deployment}", // "api_version": "2024-06-01", // "azure_ad_token_provider": { -// "provider": "autogen_ext.models.openai.AzureTokenProvider", +// "provider": "autogen_ext.auth.azure.AzureTokenProvider", // "config": { // "provider_kind": "DefaultAzureCredential", // "scopes": [ diff --git a/python/samples/core_chess_game/model_config_template.json b/python/samples/core_chess_game/model_config_template.json index bfa6913900ae..a66457f3b8e3 100644 --- a/python/samples/core_chess_game/model_config_template.json +++ b/python/samples/core_chess_game/model_config_template.json @@ -7,7 +7,7 @@ // "azure_deployment": "{your-azure-deployment}", // "api_version": "2024-06-01", // "azure_ad_token_provider": { -// "provider": "autogen_ext.models.openai.AzureTokenProvider", +// "provider": "autogen_ext.auth.azure.AzureTokenProvider", // "config": { // "provider_kind": "DefaultAzureCredential", // "scopes": [