You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the feature you'd like
Instead of using plan text password, we need support identity. Following is the example.
AclearandconcisedescriptionofwhatyouwouldlikeFlowisetohave.import{DefaultAzureCredential,getBearerTokenProvider}from"@azure/identity";import{AzureOpenAI}from"openai";import"dotenv/config.js";constcredential=newDefaultAzureCredential();constscope="https://cognitiveservices.azure.com/.default";constazureADTokenProvider=getBearerTokenProvider(credential,scope);// You will need to set these environment variables or edit the following valuesconstendpoint="https://*.openai.azure.com/";constapiVersion="2024-05-01-preview";constdeployment="gpt-4o";// This must match your deployment nameconstAZURE_OPENAI_ENDPOINT=process.env["AZURE_OPENAI_ENDPOINT"]||endpoint;constAZURE_OPENAI_VERSION=process.env["AZURE_OPENAI_VERSION"]||apiVersion;constAZURE_OPENAI_DEPLOYMENT=process.env["AZURE_OPENAI_DEPLOYMENT"]||deployment;constMODEL=process.env["model"]||"gpt-4o";console.log("==endpoint: ",AZURE_OPENAI_ENDPOINT);console.log("==version: ",AZURE_OPENAI_VERSION);console.log("==deploy: ",AZURE_OPENAI_DEPLOYMENT);console.log("==model: ",MODEL);exportasyncfunctionmain_llm(){constoptions={azureADTokenProvider:azureADTokenProvider,deployment: AZURE_OPENAI_DEPLOYMENT,apiVersion: AZURE_OPENAI_VERSION,endpoint: AZURE_OPENAI_ENDPOINT};constclient=newAzureOpenAI(options);returnclient;}module.exports={ main_llm };// CommonJS export
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered:
Describe the feature you'd like
Instead of using plan text password, we need support identity. Following is the example.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: