Library for connecting with Azure's OpenAI API from Salesforce Apex or Flow
- Register an Azure account and request access to OpenAI api (requires a form at time of publishing).
- Create a new Azure OpenAI instance
- Create a new Deployment for GPT-4 or other "Chat" model
- Grab API keys
- Install sf metadata
sf project deploy start --source-dir force-app/main/default -o <username>
- (Optional) Deploy the examples:
- Assign user to Permission Set:
sf org assign permset --name AzureOAI
- Setup Named Credential
- Update the Named Credential URL to match your deployment endpoint
- Update the External Credential Principal with your API Key
Note: For Usage, deploy example flow (sf project deploy start --source-dir force-app/main/examples -o <username>
) or see apex code in scripts