Skip to content

Commit b135c31

Browse files
authored
Merge pull request #1 from Gelembjuk/markdown
Markdown, RAG, system prompt
2 parents 4613ac0 + a238330 commit b135c31

4 files changed

Lines changed: 164 additions & 11 deletions

File tree

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ The config should be stored in `config.json` file.
5050
{
5151
"log_file_path": "",
5252
"model": "ollama:qwen2.5:3b",
53+
"system_instruction": "Talk to a user like you are Elvis Presley.",
5354
"mcpServers": {
5455
"File_Storage_Server": {
5556
"url": "http://localhost:8000/sse",
@@ -86,6 +87,41 @@ The config should be stored in `config.json` file.
8687

8788
The section `mcpServers` contains all MCP servers config. It supports both STDIO and SSE servers.
8889

90+
### Usig the memory server
91+
92+
This tools allows to use long-term AI memory using a MCP server of specific interface.
93+
94+
```
95+
"mcpServers": {
96+
"Memory_Server": {
97+
"url": "http://localhost:8001/sse",
98+
"headers": [
99+
],
100+
"interface": "memory"
101+
},
102+
.... other MCP servers
103+
},
104+
```
105+
106+
The value "interface": "memory" indicates that this server is a memory server. It will be used to store the chat history and the AI will be able to use it in the future conversations.
107+
108+
### Using the Retrieval-Augmented Generation server
109+
110+
This tools allows to use RAG using a MCP server of specific interface.
111+
112+
```
113+
"mcpServers": {
114+
"RAG_Server": {
115+
"url": "http://localhost:8002/sse",
116+
"headers": [
117+
],
118+
"interface": "rag"
119+
},
120+
.... other MCP servers
121+
},
122+
```
123+
The value "interface": "rag" indicates that this server is a RAG server. It will be used to store the chat history and the AI will be able to use it in the future conversations.
124+
89125
To run the chat using this config stored in teh `config.json`, you can use the command:
90126

91127
```

go.mod

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ module github.com/gelembjuk/cleverchatty-cli
33
go 1.24.1
44

55
require (
6+
github.com/MichaelMure/go-term-markdown v0.1.4
67
github.com/charmbracelet/glamour v0.10.0
78
github.com/charmbracelet/huh v0.7.0
89
github.com/charmbracelet/huh/spinner v0.0.0-20250414191420-151ba059f6ea
910
github.com/charmbracelet/lipgloss v1.1.1-0.20250404203927-76690c660834
1011
github.com/charmbracelet/log v0.4.0
11-
github.com/gelembjuk/cleverchatty v0.1.1
12+
github.com/gelembjuk/cleverchatty v0.1.2
1213
github.com/mark3labs/mcphost v0.6.0
1314
github.com/spf13/cobra v1.9.1
1415
golang.org/x/term v0.31.0
@@ -21,6 +22,8 @@ require (
2122
cloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect
2223
cloud.google.com/go/compute/metadata v0.6.0 // indirect
2324
cloud.google.com/go/longrunning v0.5.7 // indirect
25+
github.com/MichaelMure/go-term-text v0.3.1 // indirect
26+
github.com/alecthomas/chroma v0.7.1 // indirect
2427
github.com/alecthomas/chroma/v2 v2.14.0 // indirect
2528
github.com/atotto/clipboard v0.1.4 // indirect
2629
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
@@ -34,22 +37,29 @@ require (
3437
github.com/charmbracelet/x/exp/slice v0.0.0-20250327172914-2fdc97757edf // indirect
3538
github.com/charmbracelet/x/exp/strings v0.0.0-20240722160745-212f7b056ed0 // indirect
3639
github.com/charmbracelet/x/term v0.2.1 // indirect
40+
github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 // indirect
41+
github.com/disintegration/imaging v1.6.2 // indirect
3742
github.com/dlclark/regexp2 v1.11.0 // indirect
3843
github.com/dustin/go-humanize v1.0.1 // indirect
44+
github.com/eliukblau/pixterm/pkg/ansimage v0.0.0-20191210081756-9fb6cf8c2f75 // indirect
3945
github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect
46+
github.com/fatih/color v1.9.0 // indirect
4047
github.com/felixge/httpsnoop v1.0.4 // indirect
4148
github.com/go-logfmt/logfmt v0.6.0 // indirect
4249
github.com/go-logr/logr v1.4.2 // indirect
4350
github.com/go-logr/stdr v1.2.2 // indirect
51+
github.com/gomarkdown/markdown v0.0.0-20191123064959-2c17d62f5098 // indirect
4452
github.com/google/generative-ai-go v0.19.0 // indirect
4553
github.com/google/s2a-go v0.1.9 // indirect
4654
github.com/google/uuid v1.6.0 // indirect
4755
github.com/googleapis/enterprise-certificate-proxy v0.3.6 // indirect
4856
github.com/googleapis/gax-go/v2 v2.14.1 // indirect
4957
github.com/gorilla/css v1.0.1 // indirect
5058
github.com/inconshreveable/mousetrap v1.1.0 // indirect
59+
github.com/kyokomi/emoji/v2 v2.2.8 // indirect
5160
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
52-
github.com/mark3labs/mcp-go v0.20.0 // indirect
61+
github.com/mark3labs/mcp-go v0.29.0 // indirect
62+
github.com/mattn/go-colorable v0.1.4 // indirect
5363
github.com/mattn/go-isatty v0.0.20 // indirect
5464
github.com/mattn/go-localereader v0.0.1 // indirect
5565
github.com/mattn/go-runewidth v0.0.16 // indirect
@@ -61,6 +71,7 @@ require (
6171
github.com/muesli/termenv v0.16.0 // indirect
6272
github.com/ollama/ollama v0.5.1 // indirect
6373
github.com/rivo/uniseg v0.4.7 // indirect
74+
github.com/spf13/cast v1.7.1 // indirect
6475
github.com/spf13/pflag v1.0.6 // indirect
6576
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
6677
github.com/yosida95/uritemplate/v3 v3.0.2 // indirect
@@ -74,6 +85,7 @@ require (
7485
go.opentelemetry.io/otel/trace v1.34.0 // indirect
7586
golang.org/x/crypto v0.36.0 // indirect
7687
golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect
88+
golang.org/x/image v0.22.0 // indirect
7789
golang.org/x/net v0.37.0 // indirect
7890
golang.org/x/oauth2 v0.28.0 // indirect
7991
golang.org/x/sync v0.13.0 // indirect

0 commit comments

Comments
 (0)