Skip to content

Commit

Permalink
fix: Fix provider string for AzureTokenProvider (#4992)
Browse files Browse the repository at this point in the history
Fix provider string for AzureTokenProvider
  • Loading branch information
jackgerrits authored Jan 13, 2025
1 parent 1a6e976 commit 70f7e99
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1114,7 +1114,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"],
Expand Down
2 changes: 1 addition & 1 deletion python/packages/autogen-magentic-one/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
2 changes: 1 addition & 1 deletion python/samples/core_chess_game/model_config_template.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down

0 comments on commit 70f7e99

Please sign in to comment.