docs: enhance documentation and add gif screenshots in high quality

This commit is contained in:
hieu-jan 2024-02-16 07:56:50 +07:00
parent 8f07ee3aa9
commit 3f31d793a1
9 changed files with 12 additions and 15 deletions

View File

@ -21,7 +21,7 @@ Jan ships with a built-in API server that can be used as a drop-in, local replac
## Open Local API Server View
Navigate by clicking the `Local API Server` icon on the left side of your screen, as shown in the image below.
Navigate to the Local API Server view by clicking the corresponding icon on the left side of the screen.
<br></br>
@ -41,7 +41,7 @@ On the left side of your screen, you can set custom server options.
<br></br>
![01-server-settings](./assets/01-server-settings.png)
![01-server-settings](./assets/01-server-options.png)
### Local Server Address
@ -67,6 +67,6 @@ Click the `Start Server` button on the top left of your screen. You will see the
<br></br>
![01-running-server](./assets/01-running-server.png)
![01-running-server](./assets/01-running-server.gif)
Your server is now running. Next, learn how to use your local API server.
You server is now running and you can use the server address and port to make requests to the local server.

View File

@ -1,5 +1,5 @@
---
title: Using Local Server
title: Using Jan's Built-in API Server
description: How to use Jan's built-in API server.
keywords:
[
@ -22,13 +22,13 @@ Jan's built-in API server is compatible with [OpenAI's API](https://platform.ope
Jan contains a comprehensive API reference. This reference displays all the API endpoints available, gives you examples requests and responses, and allows you to execute them in browser.
On the top left of your screen below the red `Stop Server` button is the blue `API Reference`. Clicking this will open the reference in browser.
On the top left of your screen below the red `Stop Server` button is the blue `API Reference`. Clicking this will open the reference in your browser.
<br></br>
![02-api-reference](./assets/02-api-reference.png)
Scroll through the various available endpoints to learn what options are available.
Scroll through the various available endpoints to learn what options are available and try them out by executing the example requests. In addition, you can also use the [Jan API Reference](https://jan.ai/api-reference/) on the Jan website.
### Chat
@ -44,16 +44,12 @@ Use the API endpoints, request and response body examples as models for your own
### cURL Request Example
Here's an example curl request with a local server running `tinyllama-1.1b`:
Here is an example curl request with a local server running `tinyllama-1.1b`:
<br></br>
```json
curl -X 'POST' \
'http://localhost:1337/v1/chat/completions' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
{
"messages": [
{
"content": "You are a helpful assistant.",
@ -74,10 +70,11 @@ curl -X 'POST' \
"presence_penalty": 0,
"temperature": 0.7,
"top_p": 0.95
}'
}
'
```
### Response body example
### Response Body Example
```json
{

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 KiB

After

Width:  |  Height:  |  Size: 328 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 252 KiB