docs: update and add quickstart content

This commit is contained in:
Arista Indrajaya 2024-03-01 15:32:55 +07:00
parent 2dc90f8012
commit 5e248b78af
4 changed files with 159 additions and 13 deletions

View File

@ -44,7 +44,7 @@ import installImageURL from './assets/jan-ai-download.png';
:::warning
If you are stuck in a broken build, go to the [Broken Build](/docs/common-error/broken-build) section of Common Errors.
If you are stuck in a broken build, go to the [Broken Build](/quickstart/common-error/broken-build) section of Common Errors.
:::
@ -86,7 +86,7 @@ If you are stuck in a broken build, go to the [Broken Build](/docs/common-error/
:::warning
If you are stuck in a broken build, go to the [Broken Build](/docs/common-error/broken-build) section of Common Errors.
If you are stuck in a broken build, go to the [Broken Build](/quickstart/common-error/broken-build) section of Common Errors.
:::
@ -154,7 +154,7 @@ If you are stuck in a broken build, go to the [Broken Build](/docs/common-error/
:::warning
If you are stuck in a broken build, go to the [Broken Build](/docs/common-error/broken-build) section of Common Errors.
If you are stuck in a broken build, go to the [Broken Build](/quickstart/common-error/broken-build) section of Common Errors.
:::
</TabItem>
@ -266,7 +266,7 @@ If you are stuck in a broken build, go to the [Broken Build](/docs/common-error/
:::warning
If you are stuck in a broken build, go to the [Broken Build](/docs/common-error/broken-build) section of Common Errors.
If you are stuck in a broken build, go to the [Broken Build](/quickstart/common-error/broken-build/) section of Common Errors.
:::

View File

@ -29,9 +29,6 @@ import flow from './assets/quick.png';
3. Go to the **Hub** under the **Thread** section and select the AI model that you want to use. For more info, go to the [Using Models](category/using-models) section.
4. A new thread will be added. You can use Jan in the thread with the AI model that you selected before. */}
<div class="text--center" >
<img src={ flow } width = { 800} alt = "Flow" />
</div>
To get started quickly with Jan, follow the steps below:
@ -40,18 +37,18 @@ To get started quickly with Jan, follow the steps below:
Go to [Jan.ai](https://jan.ai/) > Select your operating system > Install the program.
:::note
To learn more about system requirements for your operating system, go to [Installation guide](/docs/install).
To learn more about system requirements for your operating system, go to [Installation guide](/quickstart/install).
:::
### Step 2: Select AI Model
Before using Jan, you need to select an AI model that based on your hardware capabilities and specifications.
Before using Jan, you need to select an AI model that based on your hardware capabilities and specifications. Each model has their purposes, capabilities, and different requirements. To select AI models:
Each model has their purposes, capabilities, and different requirements.
Go to the **Hub** > select the models that you would like to install.
To select AI models: Go to the **Hub** > select the models that you would like to install.
For more info, go to [list of supported models](/docs/models-list/).
:::note
For more info, go to [list of supported models](/quickstart/models-list/).
:::
### Step 3: Use the AI Model

View File

@ -0,0 +1,87 @@
---
title: Local Server
sidebar_position: 4
description: A step-by-step guide to start Jan Local Server.
---
Jan provides a built-in API server that can be used as a drop-in for OpenAI's API local replacement. This guide will walk you through on how to start the local server and use it to make request to the local server.
## Step 1: Set the Local Server
To start the local server, follow the steps below:
1. Navigate to the Jan main menu dashboard.
2. Click the corresponding icon on the bottom left side of your screen.
3. Select the model you want to use under the Model Settings screen to set the LLM for your local server.
4. Configure the server settings as follows:
| Feature | Description | Default Setting |
|-------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------|
| Local Server Address | By default, Jan is only accessible on the same computer it's running on, using the address 127.0.0.1. You can change this to 0.0.0.0 to let other devices on your local network access it. However, this is less secure than just allowing access from the same computer. | `localhost (127.0.0.1)` |
| Port | Jan runs on port 1337 by default. The port can be changed to any other port number as needed. | `1337` |
| Cross-Origin Resource Sharing (CORS) | Manages resource access from external domains. Enabled for security by default but can be disabled if needed. | Enabled |
| Verbose Server Logs | Provides extensive details about server activities as the local server runs, displayed at the center of the screen. | Not specified (implied enabled) |
## Step 2: Start and Use the Built-in API Server
Once you have set the server settings, you can start the server by following the steps below:
1. Click the **Start Server** button on the top left of your screen.
:::note
When the server starts, you'll see a message like `Server listening at http://127.0.0.1:1337`, and the **Start Server** button will turn into a red **Stop Server** button.
:::
2. You will be redirected to the API reference server in your browser.
3. Select the available endpoints and try them out by executing the example request.
4. In this example, we will show you how it works using the `Chat` endpoint.
5. Click the **Try it out** button.
6. The Chat endpoint has the following `cURL request example` when running using a `tinyllama-1.1b` model local server:
```json
{
"messages": [
{
"content": "You are a helpful assistant.",
"role": "system"
},
{
"content": "Hello!",
"role": "user"
}
],
"model": "tinyllama-1.1b",
"stream": true,
"max_tokens": 2048,
"stop": [
"hello"
],
"frequency_penalty": 0,
"presence_penalty": 0,
"temperature": 0.7,
"top_p": 0.95
}
'
```
7. The endpoint returns the following `JSON response body`:
```json
{
"choices": [
{
"finish_reason": null,
"index": 0,
"message": {
"content": "Hello user. What can I help you with?",
"role": "assistant"
}
}
],
"created": 1700193928,
"id": "ebwd2niJvJB1Q2Whyvkz",
"model": "_",
"object": "chat.completion",
"system_fingerprint": "_",
"usage": {
"completion_tokens": 500,
"prompt_tokens": 33,
"total_tokens": 533
}
}
```

View File

@ -0,0 +1,62 @@
---
title: Thread Management
sidebar_position: 3
hide_table_of_contents: true
description: Manage your interaction with AI locally.
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
Jan provides a straightforward and private solution for managing your threads with AI on your own device. As you interact with AI using Jan, you'll accumulate a history of threads.
Jan offers easy tools to organize, delete, or review your past threads with AI. This guide will show you how to keep your threads private and well-organized.
<Tabs>
<TabItem value="view" label = "View Thread History" default>
### View Thread History
To view your threads history, follow the steps below:
1. Navigate to the main dashboard.
2. Locate the list of threads screen on the left side.
3. To view a specific thread, simply choose the one you're interested in and then scroll up or down to explore the entire conversation.
</TabItem>
<TabItem value = "manage" label = "Managing Threads">
### Manage the Threads via Folder
To manage your threads history and configurations, follow the steps below:
1. Navigate to the Thread that you want to manage via the list of threads on the left side of the dashboard.
2. Click on the **three dots (⋮)** on the Thread section.
3. There are two available options to select:
- **Reveal in Finder**: Opens the folder containing the thread history and configurations.
- **View as JSON**: Opens the thread.json file in your default browser.
</TabItem>
<TabItem value = "clean" label = "Clean Threads">
### Clean Threads History
To clean all the messages from a thread, follow the steps below:
1. Navigate to the Thread that you want to clean.
2. Click on the **three dots (⋮)** on the Thread section.
3. Sleect the **Clean Thread** button.
:::note
This will delete all messages in the thread, while keeping the thread settings.
:::
</TabItem>
<TabItem value="delete" label = "Delete Thread" default>
### Delete Threads History
To delete a thread, follow the steps below:
1. Navigate to the Thread that you want to delete.
2. Click on the **three dots (⋮)** on the Thread section.
3. Sleect the **Delete Thread** button.
:::note
This will delete all messages and the thread settings.
:::
</TabItem>
</Tabs>