docs: enhance documentation and add gif screenshots in high quality
@ -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
|
## 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>
|
<br></br>
|
||||||
|
|
||||||
@ -41,7 +41,7 @@ On the left side of your screen, you can set custom server options.
|
|||||||
|
|
||||||
<br></br>
|
<br></br>
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
### Local Server Address
|
### 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>
|
<br></br>
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
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.
|
||||||
|
|||||||
@ -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.
|
description: How to use Jan's built-in API server.
|
||||||
keywords:
|
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.
|
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>
|
<br></br>
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
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
|
### Chat
|
||||||
|
|
||||||
@ -44,16 +44,12 @@ Use the API endpoints, request and response body examples as models for your own
|
|||||||
|
|
||||||
### cURL Request Example
|
### 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>
|
<br></br>
|
||||||
|
|
||||||
```json
|
```json
|
||||||
curl -X 'POST' \
|
{
|
||||||
'http://localhost:1337/v1/chat/completions' \
|
|
||||||
-H 'accept: application/json' \
|
|
||||||
-H 'Content-Type: application/json' \
|
|
||||||
-d '{
|
|
||||||
"messages": [
|
"messages": [
|
||||||
{
|
{
|
||||||
"content": "You are a helpful assistant.",
|
"content": "You are a helpful assistant.",
|
||||||
@ -74,10 +70,11 @@ curl -X 'POST' \
|
|||||||
"presence_penalty": 0,
|
"presence_penalty": 0,
|
||||||
"temperature": 0.7,
|
"temperature": 0.7,
|
||||||
"top_p": 0.95
|
"top_p": 0.95
|
||||||
}'
|
}
|
||||||
|
'
|
||||||
```
|
```
|
||||||
|
|
||||||
### Response body example
|
### Response Body Example
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 93 KiB After Width: | Height: | Size: 328 KiB |
BIN
docs/docs/guides/05-using-server/assets/01-running-server.gif
Normal file
|
After Width: | Height: | Size: 3.7 MiB |
|
Before Width: | Height: | Size: 95 KiB |
BIN
docs/docs/guides/05-using-server/assets/01-server-options.png
Normal file
|
After Width: | Height: | Size: 109 KiB |
|
Before Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 90 KiB |
|
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 252 KiB |