Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit 9fee2cb

Browse files
authored
Merge pull request #181 from janhq/hotfix-docs
Update docs
2 parents 64cc293 + 07f6ac1 commit 9fee2cb

File tree

7 files changed

+84
-65
lines changed

7 files changed

+84
-65
lines changed

docs/docs/demos/chatbox-vid.mdx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
title: Run local chatbox under 1 minute on MacOS with Nitro
3+
---
4+
5+
<iframe width="675" height="380" src="https://www.youtube.com/embed/apfI13ijvjc" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
6+
7+
## Links
8+
9+
- [Download Nitro](https://github.com/janhq/nitro/releases)
10+
- [Download Chatbox](https://github.com/Bin-Huang/chatbox)
11+
12+
## Commands
13+
14+
```bash title="Load model"
15+
curl http://localhost:3928/inferences/llamacpp/loadmodel \
16+
-H 'Content-Type: application/json' \
17+
-d '{
18+
"llama_model_path": "model/llama-2-7b-chat.Q5_K_M.gguf",
19+
"ctx_len": 512,
20+
"ngl": 100,
21+
}'
22+
```
23+
24+
For more information, please refer to the [Nitro with Chatbox](examples/chatbox.md) documentation.

docs/docs/examples/chatbox.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,25 @@ To download and install Chatbox, follow the instructions available at this [link
1616

1717
## Using Nitro as a Backend
1818

19-
1. Start Nitro server
19+
**1. Start Nitro server**
2020

2121
Open your command line tool and enter:
2222
```
2323
nitro
2424
```
2525

26-
> Ensure you are using the latest version of [Nitro](new/install.md)
26+
**2. Download Model**
2727

28-
2. Run the Model
28+
Use these commands to download and save the [Llama2 7B chat model](https://huggingface.co/TheBloke/Llama-2-7B-Chat-GGUF/tree/main):
29+
30+
```bash
31+
mkdir model && cd model
32+
wget -O llama-2-7b-model.gguf https://huggingface.co/TheBloke/Llama-2-7B-Chat-GGUF/resolve/main/llama-2-7b-chat.Q5_K_M.gguf?download=true
33+
```
34+
35+
> For more GGUF model, please look at [The Bloke](https://huggingface.co/TheBloke).
36+
37+
**3. Run the Model**
2938

3039
To load the model, use the following command:
3140

@@ -39,13 +48,16 @@ curl http://localhost:3928/inferences/llamacpp/loadmodel \
3948
}'
4049
```
4150

42-
3. Config chatbox
51+
**4. Config chatbox**
52+
4353
Adjust the `settings` in Chatbox to connect with Nitro. Change your settings to match the configuration shown in the image below:
4454

4555
![Settings](img/chatbox.PNG)
4656

47-
4. Chat with the Model
57+
**5. Chat with the Model**
4858

4959
Once the setup is complete, you can start chatting with the model using Chatbox. All functions of Chatbox are now enabled with Nitro as the backend.
5060

51-
## Video demo
61+
## Futher Usage
62+
63+
For convenient usage, you can utilize [Jan](https://jan.ai/), as it is integrated with Nitro.

docs/docs/examples/jan.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
title: Nitro with Jan
3+
---
4+
5+
You can effortlessly utilize Nitro through [Jan](https://jan.ai/), as it is fully integrated with all its functions. With Jan, using Nitro becomes straightforward without the need for any coding.
6+
7+
8+
<iframe width="675" height="380" src="https://www.youtube.com/embed/hw9w8_54OIc" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
9+
10+
## What is Jan?
11+
12+
Jan is a ChatGPT-alternative that runs on your own computer, with a local API server.
13+
14+
Jan uses open-source AI models, stores data in open file formats, is highly customizable via extensions.
15+
16+
For additional details, please consult the [Jan Documenation](https://jan.ai/docs).
17+
18+
> [Download Jan](https://jan.ai/)

docs/docs/examples/llm.md

Lines changed: 0 additions & 54 deletions
This file was deleted.

docs/docs/new/about.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: About Nitro
3-
slug: /about
3+
slug: /docs
44
---
55

66
Nitro is a high-efficiency C++ inference engine for edge computing, powering [Jan](https://jan.ai/). It is lightweight and embeddable, ideal for product integration.

docs/docs/new/build-source.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,13 @@ Time to build Nitro!
7272
- **On Linux:**
7373

7474
```bash
75-
make -j $(%NUMBER_OF_PROCESSORS%)
75+
make -j $(nproc)
7676
```
7777

7878
- **On Windows:**
7979

8080
```bash
81-
cmake --build . --config Release
81+
make -j $(%NUMBER_OF_PROCESSORS%)
8282
```
8383

8484
## Start process

docs/sidebars.js

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,19 @@ const sidebars = {
3333
{
3434
type: "category",
3535
label: "Features",
36+
collapsible: false,
37+
collapsed: false,
3638
link: { type: "doc", id: "features/feat" },
3739
items: [
3840
"features/chat",
3941
"features/embed",
42+
],
43+
},
44+
{
45+
type: "category",
46+
label: "Advanced Features",
47+
link: { type: "doc", id: "features/feat" },
48+
items: [
4049
"features/multi-thread",
4150
"features/cont-batch",
4251
"features/load-unload",
@@ -46,10 +55,11 @@ const sidebars = {
4655
},
4756
{
4857
type: "category",
49-
label: "Guides",
58+
label: "Integrations",
5059
collapsible: false,
5160
collapsed: false,
5261
items: [
62+
"examples/jan",
5363
"examples/chatbox",
5464
"examples/openai-node",
5565
"examples/openai-python",
@@ -62,7 +72,16 @@ const sidebars = {
6272
// collapsed: false,
6373
// items: [{ type: "doc", id: "new/architecture", label: "Architecture" }],
6474
// },
65-
"new/faq"
75+
{
76+
type: "category",
77+
label: "Demos",
78+
collapsible: true,
79+
collapsed: true,
80+
items: [
81+
"demos/chatbox-vid",
82+
],
83+
},
84+
"new/faq",
6685
],
6786

6887
apiSidebar: [

0 commit comments

Comments
 (0)