Azure OpenAI
How to Integrate Azure OpenAI with Jan
The Azure OpenAI Service offers robust APIs, making it simple for you to incorporate OpenAI's language models into your applications. You can integrate Azure OpenAI with Jan by following the steps below:
Step 1: Configure Azure OpenAI Service API Key
-
Set up and deploy the Azure OpenAI Service.
-
Once you've set up and deployed Azure OpenAI Service, you can find the endpoint and API key in Azure OpenAI Studio under
Chat>View code. -
Set up the endpoint and API key for Azure OpenAI Service in the
~/jan/engines/openai.jsonfile.
~/jan/engines/openai.json
{
// https://hieujan.openai.azure.com/openai/deployments/gpt-35-hieu-jan/chat/completions?api-version=2023-07-01-preview
"full_url": "https://<your-resource-name>.openai.azure.com/openai/deployments/<your-deployment-name>/chat/completions?api-version=<api-version>",
"api_key": "<your-api-key>"
}
Step 2: Model Configuration
- Go to the
~/jan/modelsdirectory. - Make a new folder called
(your-deployment-name), for examplegpt-35-hieu-jan. - Create a
model.jsonfile inside the folder with the specified configurations:
- Match the
idproperty with both the folder name and your deployment name. - Set the
formatproperty asapi. - Choose
openaifor theengineproperty. - Set the
stateproperty asready.
~/jan/models/gpt-35-hieu-jan/model.json
{
"sources": [
{
"filename": "azure_openai",
"url": "https://hieujan.openai.azure.com"
}
],
"id": "gpt-35-hieu-jan",
"object": "model",
"name": "Azure OpenAI GPT 3.5",
"version": "1.0",
"description": "Azure Open AI GPT 3.5 model is extremely good",
"format": "api",
"settings": {},
"parameters": {},
"metadata": {
"author": "OpenAI",
"tags": ["General", "Big Context Length"]
},
"engine": "openai"
}
note
For more details regarding the model.json settings and parameters fields, please see here.
Step 3: Start the Model
- Restart Jan and go to the Hub.
- Find your model in Jan application and click on the Use button.