We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When following the official guide of Magentic-one, I have encountered the exception.
To reproduce the exception:
env "CHAT_COMPLETION_CLIENT_CONFIG=$(cat config.json)" LOGLEVEL=DEBUG python examples/example.py --logs_dir ./logs
Content of config.json:
config.json
{ "provider": "AzureOpenAIChatCompletionClient", "config": { "model": "gpt-4o-2024-05-13", "azure_endpoint": "https://{your-custom-endpoint}.openai.azure.com/", "azure_deployment": "{your-azure-deployment}", "api_version": "2024-06-01", "azure_ad_token_provider": { "provider": "autogen_ext.models.openai.AzureTokenProvider", "config": { "provider_kind": "DefaultAzureCredential", "scopes": [ "https://cognitiveservices.azure.com/.default" ] } } } }
In order to resolve this issue, I have made the following change, but unsure if it is appropriate or effective.
# file: python/packages/autogen-core/src/autogen_core/_component_config.py # in: class ComponentLoader, def load_component _typ = ComponentConfigImpl[BaseModel] try: _val = module.__getattribute__(class_name) # AttributeError: module 'autogen_ext.models.openai' has no attribute 'AzureTokenProvider' except: print("Falling back to default class:", cls.__name__) _val = cls component_class = cast(_typ, _val)
The text was updated successfully, but these errors were encountered:
The provider for the token provider should be:
"provider": "autogen_ext.auth.azure.AzureTokenProvider",
I'll submit a fix for this in main.
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
When following the official guide of Magentic-one, I have encountered the exception.
To reproduce the exception:
env "CHAT_COMPLETION_CLIENT_CONFIG=$(cat config.json)" LOGLEVEL=DEBUG python examples/example.py --logs_dir ./logs
Content of
config.json
:In order to resolve this issue, I have made the following change, but unsure if it is appropriate or effective.
The text was updated successfully, but these errors were encountered: