| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
…dd_azure_ad_authentication
|
@sorinsuciu-msft I think this looks good. Good to merge from your side? |
Sorry, something went wrong.
* Make embeddings_utils be importable (openai#104) * Make embeddings_utils be importable * Small tweaks to dicts for typing * Remove default api_prefix and move v1 prefix to default api_base (openai#95) * make construct_from key argument optional (openai#92) * Split search.prepare_data into answers/classifications/search versions (openai#93) * Break out prepare_data into answers, classifications, and search * And cleaned up CLI * Validate search files (openai#69) * Add validators for search files * Clean up fields Co-authored-by: kennyhsu5 <1762087+kennyhsu5@users.noreply.github.com> Co-authored-by: Madeleine Thompson <madeleine@openai.com>
Yes, looks good to me, thank you. |
Sorry, something went wrong.
* Make embeddings_utils be importable (openai#104) * Make embeddings_utils be importable * Small tweaks to dicts for typing * Remove default api_prefix and move v1 prefix to default api_base (openai#95) * make construct_from key argument optional (openai#92) * Split search.prepare_data into answers/classifications/search versions (openai#93) * Break out prepare_data into answers, classifications, and search * And cleaned up CLI * Validate search files (openai#69) * Add validators for search files * Clean up fields Co-authored-by: kennyhsu5 <1762087+kennyhsu5@users.noreply.github.com> Co-authored-by: Madeleine Thompson <madeleine@openai.com>
* Add Azure AD authentication support * Add azure_ad code examples * Remove debug print statement * Bump version
| Back | FazBrowse Home | New Git URL |
This PR adds support for authentication using azure active directory.
For azure_ad authentication the api_type needs to be set to "azure_ad" (or alternatively "azuread") and the credentials token needs to be passed to api_key. Similar to the azure key-based authentication, the api_version has to be specified
from azure.identity import DefaultAzureCredential import openai default_credential = DefaultAzureCredential( exclude_interactive_browser_credential=False) token = default_credential.get_token("https://cognitiveservices.azure.com") openai.api_type = "azure_ad" openai.api_key = token.token openai.api_version = "2022-03-01-preview" openai.api_base = "https://your-endpoint.openai.azure.com/"