microsoft / TypeChat

TypeChat is a library that makes it easy to build natural language interfaces using types.
https://microsoft.github.io/TypeChat/
MIT License
8.24k stars 391 forks source link

[Python] Support using keyless auth for Azure OpenAI #216

Open pamelafox opened 8 months ago

pamelafox commented 8 months ago

We try to use keyless auth for all our samples, so if I were to use TypeChat in them, it'd need to support keyless auth, aka this constructor:

    openai_client = AsyncAzureOpenAI(
        api_version=api_version,
        azure_endpoint=endpoint,
        azure_ad_token_provider=token_provider,
    )

I'd be happy to just pass in my whole client to typechat as I typically already have it configured correctly for other uses in my app. Trying to match environment variables will be a pain since we have existing environment variable names that arent the same as yours.

pamelafox commented 6 months ago

Keyless auth is now a strict requirement for all our samples, so this a blocker for us.