This guide explains how to configure API keys for Azure OpenAI to enable Discourse AI features that require 3rd party LLM keys.
Required user level: Administrator
In this example, we are using Azure OpenAI to generate the keys.
Note: You will likely need a paid plan and have to pay per usage. See here for up-to-date details and pricing .
Platforms will always change so this guide may not reflect 100% process.
In order to use certain AI modules, users must have an API Key from a 3rd party provider such as OpenAI (ChatGPT), Anthropic (Claude), Stability AI (Stable Diffusion), etc
Please check each AI module to see which 3rd party providers can be used for it.
Obtain API keys
- Go through the documentation here to obtain the necessary API keys depending on the OpenAI models you choose and the Discourse AI modules/features you use
- Once the keys are obtained, store them in a safe and secure place and copy it
Using API keys for Discourse AI
- Go to
Admin
settings->Plugins
āAI
āLLMs
tab - Click on the + New Model button.
- Select the appropriate model from the list.
- Select
Azure
from theService hosting the model
list - Input the
URL of the service hosting the model
Example URL:
https://{RESOURCE_NAME}.openai.azure.com/openai/deployments/{DEPLOYMENT_NAME}/>chat/completions?api-version=2024-02-15-preview
where
- RESOURCE_NAME is the name of your Azure OpenAI resource
- DEPLOYMENT_NAME is the name of your GPT-4 Turbo with Vision model deployment
- Paste the API key into the
API Key of the service hosting the model
field - Save the LLM
Additional settings
The settings will depend on the OpenAI model you choose and the Discourse AI modules/features you use. The following settings can be found in the Admin
settings-> Plugins
ā AI
ā Settings
tab:
-
ai openai API key
: API key for OpenAI API -
ai openai embeddings url
: Custom URL used for OpenAI embeddings API (use specific URL for Azure) -
ai openai dall e 3 url
: Custom URL used for DALL-E 3 image generation
Last edited by @pedrom 2024-08-01T02:16:11Z
Check document
Perform check on document: