Commit Graph

8884 Commits

Author SHA1 Message Date
Bartosz Taudul
f4e340b573 Add note about context size estimation. 2025-07-12 11:50:04 +02:00
Bartosz Taudul
d0acd37b54 Calculate system prompt context size estimate. 2025-07-12 11:50:03 +02:00
Bartosz Taudul
290198704b Rewrite the tools description to json. 2025-07-12 11:50:03 +02:00
Bartosz Taudul
522395d37e Add a send message button. 2025-07-12 11:50:03 +02:00
Bartosz Taudul
72de3ecaa7 Add web cache. 2025-07-12 11:50:03 +02:00
Bartosz Taudul
82b976b1ee Adjust user messages color. 2025-07-12 11:50:03 +02:00
Bartosz Taudul
97048cf692 Improve wikipedia search by providing a summary of the page. 2025-07-12 11:50:03 +02:00
Bartosz Taudul
a6c77d73a4 Enable wikipedia in other languages. 2025-07-12 11:50:03 +02:00
Bartosz Taudul
5bbe81a029 Don't retrieve the full image, thumbnail is enough.
Too much context pollution for too little gain.
2025-07-12 11:50:03 +02:00
Bartosz Taudul
1f9639dfe3 Reword tool knowledge rules. 2025-07-12 11:50:02 +02:00
Bartosz Taudul
14fc45a1e2 Specify user agent. 2025-07-12 11:50:02 +02:00
Bartosz Taudul
a7cc678960 Display appropriate icon when tool reply contains an image. 2025-07-12 11:50:02 +02:00
Bartosz Taudul
46c000fd66 Fix scrolling. 2025-07-12 11:50:02 +02:00
Bartosz Taudul
41f9b75372 Add Latin Extended A/B to fixed width font. 2025-07-12 11:50:02 +02:00
Bartosz Taudul
a35e996f4f Release lock when handling tool calls. 2025-07-12 11:50:02 +02:00
Bartosz Taudul
0ba0590dbc Don't use the "tool" role. 2025-07-12 11:50:02 +02:00
Bartosz Taudul
68b73811c4 Retrieve images from wikipedia. 2025-07-12 11:50:02 +02:00
Bartosz Taudul
13eca84926 Use the user language. 2025-07-12 11:50:01 +02:00
Bartosz Taudul
80f678c28a Replace spaces in wikipedia page queries with underscores. 2025-07-12 11:50:01 +02:00
Bartosz Taudul
e293f87a8a Adapt the wikipedia page cut-off to the available context size. 2025-07-12 11:50:01 +02:00
Bartosz Taudul
31afd9dbca Url encode wikipedia search queries. 2025-07-12 11:50:01 +02:00
Bartosz Taudul
4f49635c42 Further system prompt refinement. 2025-07-12 11:50:01 +02:00
Bartosz Taudul
b2f3e6b681 The models like to group separate wikipedia query terms.
Some search examples:
1. Tracy Profiler
2. "Tracy Profiler" "C++"
3. "Tracy Profiler"
2025-07-12 11:50:01 +02:00
Bartosz Taudul
40fed7dd6f Update system prompt with new rules. 2025-07-12 11:50:01 +02:00
Bartosz Taudul
8a6a6d8132 Merge wikipedia query terms with '+' in code, not in LLM. 2025-07-12 11:50:01 +02:00
Bartosz Taudul
116881ae81 Remove stray \r characters from the LLM responses. 2025-07-12 11:50:01 +02:00
Bartosz Taudul
50886ac16e Wikipedia search + article retrieval. 2025-07-12 11:50:00 +02:00
Bartosz Taudul
b0a36cb8e8 Use correct parameter for setting context size. 2025-07-12 11:50:00 +02:00
Bartosz Taudul
a8dd0ca232 Add Latin Extended A/B to font. 2025-07-12 11:50:00 +02:00
Bartosz Taudul
b54e36df29 Display context usage. 2025-07-12 11:50:00 +02:00
Bartosz Taudul
e60e30ddf1 Don't persist tree node open state between chats. 2025-07-12 11:50:00 +02:00
Bartosz Taudul
b163d97e65 Fix setting context size. 2025-07-12 11:50:00 +02:00
Bartosz Taudul
f65302984e Remove html2md, remove access to web for LLM. 2025-07-12 11:50:00 +02:00
Bartosz Taudul
8b100ff11d Use custom tool handling.
The ollama tool_calls do not preserve the context of why the tool was
called. The feature as it is right now doesn't seem to be designed for
the LLM to make queries, but rather to act as an agent that is supposed
to call some functions that will directly provide their output to the
user.

Instead, let's encode the tool calling protocol in the system prompt.
2025-07-12 11:50:00 +02:00
Bartosz Taudul
0d3e183540 Display tool responses in chat. 2025-07-12 11:49:59 +02:00
Bartosz Taudul
05f7019f30 Chat will have system prompt. 2025-07-12 11:49:59 +02:00
Bartosz Taudul
2e61fbac78 Expand system prompt. 2025-07-12 11:49:59 +02:00
Bartosz Taudul
4ad9e05814 Convert html to markdown. 2025-07-12 11:49:59 +02:00
Bartosz Taudul
f5ea5ffce1 Display tool call arguments. 2025-07-12 11:49:59 +02:00
Bartosz Taudul
dc8c106454 Implement fetching web pages. 2025-07-12 11:49:59 +02:00
Bartosz Taudul
3a60926f65 Link with libcurl. 2025-07-12 11:49:59 +02:00
Bartosz Taudul
9202ce277d Respond to tool calls. 2025-07-12 11:49:59 +02:00
Bartosz Taudul
b4763c7500 Pass messages to SendMessage() as const ref, not rvalue. 2025-07-12 11:49:58 +02:00
Bartosz Taudul
78257553c7 Allow disabling tools use. 2025-07-12 11:49:58 +02:00
Bartosz Taudul
4c46cc4deb Push available tools list to ollama. 2025-07-12 11:49:58 +02:00
Bartosz Taudul
7eedbe130e Prepare ollama request in an explicit way. 2025-07-12 11:49:58 +02:00
Bartosz Taudul
3414773f18 Keep system prompt unembedded. 2025-07-12 11:49:58 +02:00
Bartosz Taudul
c8dbe33a3c Move LLM system prompt to an external file. 2025-07-12 11:49:58 +02:00
Bartosz Taudul
cc0aa73527 Add embed utilities. 2025-07-12 11:49:58 +02:00
Bartosz Taudul
8006ae9e30 Build embed tool. 2025-07-12 11:49:58 +02:00