diff --git a/docs/docs/guides/05-using-server/01-start-server.md b/docs/docs/guides/05-using-server/01-start-server.md index 03973a9d1..c8e5cdba3 100644 --- a/docs/docs/guides/05-using-server/01-start-server.md +++ b/docs/docs/guides/05-using-server/01-start-server.md @@ -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.

@@ -41,7 +41,7 @@ On the left side of your screen, you can set custom server options.

-![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

-![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. diff --git a/docs/docs/guides/05-using-server/02-using-server.md b/docs/docs/guides/05-using-server/02-using-server.md index 62fdd50a5..3d4b004a1 100644 --- a/docs/docs/guides/05-using-server/02-using-server.md +++ b/docs/docs/guides/05-using-server/02-using-server.md @@ -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.

![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`:

```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 { diff --git a/docs/docs/guides/05-using-server/assets/01-choose-model.png b/docs/docs/guides/05-using-server/assets/01-choose-model.png index 08f468264..9062a1e95 100644 Binary files a/docs/docs/guides/05-using-server/assets/01-choose-model.png and b/docs/docs/guides/05-using-server/assets/01-choose-model.png differ diff --git a/docs/docs/guides/05-using-server/assets/01-running-server.gif b/docs/docs/guides/05-using-server/assets/01-running-server.gif new file mode 100644 index 000000000..a4225f3cb Binary files /dev/null and b/docs/docs/guides/05-using-server/assets/01-running-server.gif differ diff --git a/docs/docs/guides/05-using-server/assets/01-running-server.png b/docs/docs/guides/05-using-server/assets/01-running-server.png deleted file mode 100644 index 078806d88..000000000 Binary files a/docs/docs/guides/05-using-server/assets/01-running-server.png and /dev/null differ diff --git a/docs/docs/guides/05-using-server/assets/01-server-options.png b/docs/docs/guides/05-using-server/assets/01-server-options.png new file mode 100644 index 000000000..c48844e40 Binary files /dev/null and b/docs/docs/guides/05-using-server/assets/01-server-options.png differ diff --git a/docs/docs/guides/05-using-server/assets/01-server-settings.png b/docs/docs/guides/05-using-server/assets/01-server-settings.png deleted file mode 100644 index bfb41332b..000000000 Binary files a/docs/docs/guides/05-using-server/assets/01-server-settings.png and /dev/null differ diff --git a/docs/docs/guides/05-using-server/assets/02-api-reference.png b/docs/docs/guides/05-using-server/assets/02-api-reference.png index 8cfef431c..154d9dfc9 100644 Binary files a/docs/docs/guides/05-using-server/assets/02-api-reference.png and b/docs/docs/guides/05-using-server/assets/02-api-reference.png differ diff --git a/docs/docs/guides/05-using-server/assets/02-chat-example.png b/docs/docs/guides/05-using-server/assets/02-chat-example.png index 4227fdbf6..bd7e33a6a 100644 Binary files a/docs/docs/guides/05-using-server/assets/02-chat-example.png and b/docs/docs/guides/05-using-server/assets/02-chat-example.png differ