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

Commit 6395c17

Browse files
authored
Merge pull request #186 from janhq/update-docs
Pal Chat Example Update
2 parents 2ea59f8 + 2a37c29 commit 6395c17

File tree

3 files changed

+64
-0
lines changed

3 files changed

+64
-0
lines changed

docs/docs/examples/img/pal.png

121 KB
Loading

docs/docs/examples/palchat.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
title: Nitro with Pal Chat
3+
---
4+
5+
This guide demonstrates how to use Nitro with Pal Chat, enabling local AI chat capabilities on mobile devices.
6+
7+
## What is Pal - AI Chat Client?
8+
9+
Pal is a mobile app available on the App Store. It offers a customizable chat playground and supports various AI models including GPT-4 Turbo, GPT-4 Vision, DALL-E 3, Claude 2, PaLM, Openrouter, and locally hosted LLMs.
10+
11+
- [Download Pal Chat](https://apps.apple.com/us/app/pal-ai-chat-client/id6447545085)
12+
13+
## Using Pal with Nitro
14+
15+
**1. Start Nitro server**
16+
17+
Open your terminal:
18+
```
19+
nitro
20+
```
21+
22+
**2. Download Model**
23+
24+
Use these commands to download and save the [Llama2 7B chat model](https://huggingface.co/TheBloke/Llama-2-7B-Chat-GGUF/tree/main):
25+
26+
```bash
27+
mkdir model && cd model
28+
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
29+
```
30+
31+
> For more GGUF model, please look at [The Bloke](https://huggingface.co/TheBloke).
32+
33+
**3. Run the Model**
34+
35+
To load the model, use the following command:
36+
37+
```
38+
curl http://localhost:3928/inferences/llamacpp/loadmodel \
39+
-H 'Content-Type: application/json' \
40+
-d '{
41+
"llama_model_path": "model/llama-2-7b-chat.Q5_K_M.gguf",
42+
"ctx_len": 512,
43+
"ngl": 100,
44+
}'
45+
```
46+
47+
**4. Config Pal Chat**
48+
49+
Adjust the `provide custom host` setting under `advanced settings` in Pal Chat to connect with Nitro. Enter your LAN IPv4 address (It should be something like 192.xxx.x.xxx).
50+
51+
> For instruction read: [How to find your IP](https://support.microsoft.com/en-us/windows/find-your-ip-address-in-windows-f21a9bbc-c582-55cd-35e0-73431160a1b9)
52+
53+
![PalChat](img/pal.png)
54+
55+
**5. Chat with the Model**
56+
57+
Once the setup is complete, you can start chatting with the model using Pal Chat.
58+
59+
<iframe width="380" height="675" src="https://www.youtube.com/embed/pq9_f0p39Fg" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
60+
61+
## Futher Usage
62+
63+
For convenient usage, you can utilize [Jan](https://jan.ai/), as it is integrated with Nitro.

docs/sidebars.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ const sidebars = {
6161
items: [
6262
"examples/jan",
6363
"examples/chatbox",
64+
"examples/palchat",
6465
"examples/openai-node",
6566
"examples/openai-python",
6667
],

0 commit comments

Comments
 (0)