docs: improve syntax

This commit is contained in:
Ho Duc Hieu 2024-01-05 23:42:01 +07:00
parent b639c4e685
commit 10fbfff8fe
4 changed files with 26 additions and 14 deletions

View File

@ -15,7 +15,7 @@ keywords:
] ]
--- ---
# Install Jan from Source # Installing Jan from Source
## Installation ## Installation
@ -28,7 +28,11 @@ Before proceeding with the installation of Jan from source, ensure that the foll
### Instructions ### Instructions
> **_Note:_** This instruction is tested on MacOS only. :::note
This instruction is tested on MacOS only.
:::
1. Clone the Jan repository from GitHub 1. Clone the Jan repository from GitHub

View File

@ -38,7 +38,7 @@ Navigate to the `~/jan/models` folder. Create a folder named `gpt-3.5-turbo-16k`
- Ensure the `engine` property is set to `openai`. - Ensure the `engine` property is set to `openai`.
- Ensure the `state` property is set to `ready`. - Ensure the `state` property is set to `ready`.
```js ```json title="~/jan/models/gpt-3.5-turbo-16k/model.json"
{ {
"source_url": "https://openai.com", "source_url": "https://openai.com",
// highlight-next-line // highlight-next-line
@ -65,7 +65,7 @@ Navigate to the `~/jan/models` folder. Create a folder named `gpt-3.5-turbo-16k`
You can find your API keys in the [OpenAI Platform](https://platform.openai.com/api-keys) and set the OpenAI API keys in `~/jan/engines/openai.json` file. You can find your API keys in the [OpenAI Platform](https://platform.openai.com/api-keys) and set the OpenAI API keys in `~/jan/engines/openai.json` file.
```js ```json title="~/jan/engines/openai.json"
{ {
"full_url": "https://api.openai.com/v1/chat/completions", "full_url": "https://api.openai.com/v1/chat/completions",
// highlight-next-line // highlight-next-line
@ -83,17 +83,23 @@ Restart Jan and navigate to the Hub. Then, select your configured model and star
In this section, we will show you how to configure a client connection to a remote/local server, using Jan's API server that is running model `mistral-ins-7b-q4` as an example. In this section, we will show you how to configure a client connection to a remote/local server, using Jan's API server that is running model `mistral-ins-7b-q4` as an example.
:::note
- Please note that at the moment, you can only connect to one OpenAI compatible endpoint at a time.
:::
### 1. Configure a Client Connection ### 1. Configure a Client Connection
Navigate to the `~/jan/engines` folder and modify the `openai.json` file. Please note that at the moment the code that supports any openai compatible endpoint only reads `engine/openai.json` file, thus, it will not search any other files in this directory. Navigate to the `~/jan/engines` folder and modify the `openai.json` file. Please note that at the moment the code that supports any openai compatible endpoint only reads `engine/openai.json` file, thus, it will not search any other files in this directory.
Configure `full_url` properties with the endpoint server that you want to connect. For example, if you want to connect to Jan's API server, you can configure it as follows: Configure `full_url` properties with the endpoint server that you want to connect. For example, if you want to connect to Jan's API server, you can configure it as follows:
```js ```json title="~/jan/engines/openai.json"
{ {
// highlight-start // highlight-start
// "full_url": "https://<server-ip-address>:<port>/v1/chat/completions" // "full_url": "https://<server-ip-address>:<port>/v1/chat/completions"
"full_url": "https://<server-ip-address>:1337/v1/chat/completions", "full_url": "https://<server-ip-address>:1337/v1/chat/completions"
// highlight-end // highlight-end
// Skip api_key if your local server does not require authentication // Skip api_key if your local server does not require authentication
// "api_key": "sk-<your key here>" // "api_key": "sk-<your key here>"
@ -110,7 +116,7 @@ Navigate to the `~/jan/models` folder. Create a folder named `mistral-ins-7b-q4`
- Ensure the `engine` property is set to `openai`. - Ensure the `engine` property is set to `openai`.
- Ensure the `state` property is set to `ready`. - Ensure the `state` property is set to `ready`.
```js ```json title="~/jan/models/mistral-ins-7b-q4/model.json"
{ {
"source_url": "https://jan.ai", "source_url": "https://jan.ai",
// highlight-next-line // highlight-next-line
@ -125,10 +131,7 @@ Navigate to the `~/jan/models` folder. Create a folder named `mistral-ins-7b-q4`
"parameters": {}, "parameters": {},
"metadata": { "metadata": {
"author": "MistralAI, The Bloke", "author": "MistralAI, The Bloke",
"tags": [ "tags": ["remote", "awesome"]
"remote",
"awesome"
]
}, },
// highlight-start // highlight-start
"engine": "openai", "engine": "openai",

View File

@ -118,4 +118,9 @@ The following steps will help you troubleshoot and resolve issues related to bro
</Tabs> </Tabs>
4. Download the latest version from via our homepage, [https://jan.ai/](https://jan.ai/). 4. Download the latest version from via our homepage, [https://jan.ai/](https://jan.ai/).
> Note: If Jan is installed on multiple user accounts on your device, ensure it's completely removed from all shared space before reinstalling.
:::note
If Jan is installed on multiple user accounts on your device, ensure it's completely removed from all shared space before reinstalling.
:::

View File

@ -260,9 +260,9 @@ const config = {
], ],
}, },
prism: { prism: {
theme: darkCodeTheme, theme: darkCodeTheme,
darkTheme: darkCodeTheme, darkTheme: darkCodeTheme,
additionalLanguages: ["python", "powershell", "bash"], additionalLanguages: ["python", "powershell", "bash", "json", "javascript", "jsx"],
}, },
colorMode: { colorMode: {
defaultMode: "light", defaultMode: "light",