forked from janhq/jan
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add integration AzureOpenAI (janhq#1632)
docs: add integration AzureOpenAI
- Loading branch information
Showing
6 changed files
with
92 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
91 changes: 91 additions & 0 deletions
91
docs/docs/guides/07-integrations/03-integrate-azure-openai-service.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
--- | ||
title: Integrate Azure OpenAI Service with Jan | ||
slug: /guides/integrations/azure-openai-service | ||
description: Guide to integrate Azure OpenAI Service with Jan | ||
keywords: | ||
[ | ||
Jan AI, | ||
Jan, | ||
ChatGPT alternative, | ||
local AI, | ||
private AI, | ||
conversational AI, | ||
no-subscription fee, | ||
large language model, | ||
integration, | ||
Azure OpenAI Service, | ||
] | ||
--- | ||
|
||
## Quick Introduction | ||
|
||
[Azure OpenAI Service](https://learn.microsoft.com/en-us/azure/ai-services/openai/overview?source=docs) provides a set of powerful APIs that enable you to easily integrate the OpenAI's language models. | ||
|
||
In this guide, we will show you how to integrate Azure OpenAI Service with Jan. | ||
|
||
## Steps to Integrate Azure OpenAI Service with Jan | ||
|
||
### 1. Configure Azure OpenAI Service API key | ||
|
||
Once you completed setting up and deploying the Azure OpenAI Service, you can find the endpoint and API key in the [Azure OpenAI Studio](https://oai.azure.com/) by navigating to `Chat` > `View code`. | ||
|
||
![View-code](./assets/03-viewcode.png) | ||
|
||
<br> </br> | ||
|
||
![AzureOpenAIKeyandEndpoint](./assets/03-azureopenai-endpoint-key.png) | ||
|
||
Set the Azure OpenAI Service endpoint and API key in the `~/jan/engines/openai.json` file. | ||
|
||
```json title="~/jan/engines/openai.json" | ||
{ | ||
// https://hieujan.openai.azure.com/openai/deployments/gpt-35-hieu-jan/chat/completions?api-version=2023-07-01-preview | ||
// highlight-start | ||
"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>" | ||
// highlight-end | ||
} | ||
``` | ||
|
||
### 2. Modify a Model JSON | ||
|
||
Navigate to the `~/jan/models` folder. Create a folder named `<your-deployment-name>`, for example, `gpt-35-hieu-jan` and create a `model.json` file inside the folder including the following configurations: | ||
|
||
- Ensure the filename must be `model.json`. | ||
- Ensure the `id` property is set to the same as the folder name and your deployment name. | ||
- Ensure the `format` property is set to `api`. | ||
- Ensure the `engine` property is set to `openai`. | ||
- Ensure the `state` property is set to `ready`. | ||
|
||
```json title="~/jan/models/gpt-35-hieu-jan/model.json" | ||
{ | ||
"source_url": "https://hieujan.openai.azure.com", | ||
// highlight-next-line | ||
"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", | ||
// highlight-next-line | ||
"format": "api", | ||
"settings": {}, | ||
"parameters": {}, | ||
"metadata": { | ||
"author": "OpenAI", | ||
"tags": ["General", "Big Context Length"] | ||
}, | ||
// highlight-start | ||
"engine": "openai", | ||
"state": "ready" | ||
// highlight-end | ||
} | ||
``` | ||
|
||
### 3. Start the Model | ||
|
||
Restart Jan and navigate to the Hub. Locate your model and click the Use button. | ||
![StartModel](./assets/03-start-model.png) | ||
|
||
### 4. Try Out the Integration of Jan and Azure OpenAI Service | ||
|
||
![Integration Demo](./assets/03-azureopenai-integration-demo.gif) |
Binary file added
BIN
+827 KB
docs/docs/guides/07-integrations/assets/03-azureopenai-endpoint-key.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+9.93 MB
docs/docs/guides/07-integrations/assets/03-azureopenai-integration-demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.