Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: improve docs syntax #1394

Merged
merged 5 commits into from
Jan 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions docs/docs/guides/02-installation/04-from-source.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 15,7 @@ keywords:
]
---

# Install Jan from Source
# Installing Jan from Source

## Installation

Expand All @@ -28,7 28,11 @@ Before proceeding with the installation of Jan from source, ensure that the foll

### Instructions

> **_Note:_** This instruction is tested on MacOS only.
:::note

This instruction is tested on MacOS only.

:::

1. Clone the Jan repository from GitHub

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/guides/04-using-models/02-import-manually.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 127,7 @@ Edit `model.json` and include the following configurations:
- Ensure you are using the correct `prompt_template`. This is usually provided in the HuggingFace model's description page.
- Ensure the `state` property is set to `ready`.

```js
```json title="model.json"
{
// highlight-start
"source_url": "https://huggingface.co/janhq/trinity-v1-GGUF/resolve/main/trinity-v1.Q4_K_M.gguf",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 `state` property is set to `ready`.

```js
```json title="~/jan/models/gpt-3.5-turbo-16k/model.json"
{
"source_url": "https://openai.com",
// highlight-next-line
Expand All @@ -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.

```js
```json title="~/jan/engines/openai.json"
{
"full_url": "https://api.openai.com/v1/chat/completions",
// highlight-next-line
Expand All @@ -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.

:::note

- Please note that at the moment, you can only connect to one OpenAI compatible endpoint at a time.

:::

### 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.

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
// "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
// Skip api_key if your local server does not require authentication
// "api_key": "sk-<your key here>"
Expand All @@ -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 `state` property is set to `ready`.

```js
```json title="~/jan/models/mistral-ins-7b-q4/model.json"
{
"source_url": "https://jan.ai",
// highlight-next-line
Expand All @@ -125,10 131,7 @@ Navigate to the `~/jan/models` folder. Create a folder named `mistral-ins-7b-q4`
"parameters": {},
"metadata": {
"author": "MistralAI, The Bloke",
"tags": [
"remote",
"awesome"
]
"tags": ["remote", "awesome"]
},
// highlight-start
"engine": "openai",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 118,9 @@ The following steps will help you troubleshoot and resolve issues related to bro
</Tabs>

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.

:::
4 changes: 2 additions & 2 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 260,9 @@ const config = {
],
},
prism: {
theme: darkCodeTheme,
theme: darkCodeTheme,
darkTheme: darkCodeTheme,
additionalLanguages: ["python", "powershell", "bash"],
additionalLanguages: ["python", "powershell", "bash", "json", "javascript", "jsx"],
},
colorMode: {
defaultMode: "light",
Expand Down