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.json
file.
~/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/models
directory. - Make a new folder called
(your-deployment-name)
, for examplegpt-35-hieu-jan
. - Create a
model.json
file inside the folder with the specified configurations:
- Match the
id
property with both the folder name and your deployment name. - Set the
format
property asapi
. - Choose
openai
for theengine
property. - Set the
state
property 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.