Commit Graph

8953 Commits

Author SHA1 Message Date
Bartosz Taudul
bddd705861 Do system prompt tag injection properly. 2025-07-12 11:50:12 +02:00
Bartosz Taudul
9d825e794b Refine system prompt. 2025-07-12 11:50:12 +02:00
Bartosz Taudul
bf9e4f6254 Update system prompt. 2025-07-12 11:50:12 +02:00
Bartosz Taudul
c5422e0264 Add user_manual tool. 2025-07-12 11:50:12 +02:00
Bartosz Taudul
0520d12b24 Reserve memory for embeddings. 2025-07-12 11:50:11 +02:00
Bartosz Taudul
96e03b079e Embeddings calls may need to be done on a separate connection.
The completion reply may be unfinished when the embeddings call is executed.
2025-07-12 11:50:11 +02:00
Bartosz Taudul
75e9e589b8 Make SetupCurl() work with any curl context. 2025-07-12 11:50:11 +02:00
Bartosz Taudul
f1d1e00659 Model may be unloaded after completion (by embeddings call). 2025-07-12 11:50:11 +02:00
Bartosz Taudul
da54eec537 Disable another stupid check. 2025-07-12 11:50:11 +02:00
Bartosz Taudul
338e029621 Fill in manual vector database. 2025-07-12 11:50:11 +02:00
Bartosz Taudul
e54f4d6a15 Add vector database. 2025-07-12 11:50:11 +02:00
Bartosz Taudul
e3db1eb7ee Probe embeddings vector length. 2025-07-12 11:50:11 +02:00
Bartosz Taudul
746f28e3c9 Add UI for building manual embeddings. 2025-07-12 11:50:10 +02:00
Bartosz Taudul
b4fe4c460c Calculation of manual embeddings. 2025-07-12 11:50:10 +02:00
Bartosz Taudul
89d65b52d9 Add API for getting embeddings vector. 2025-07-12 11:50:10 +02:00
Bartosz Taudul
932af50d3e Set headers for GET. 2025-07-12 11:50:10 +02:00
Bartosz Taudul
4301573d95 Embed manual contents. 2025-07-12 11:50:10 +02:00
Bartosz Taudul
85086c461b Separate selection of LLM and embeddings model. 2025-07-12 11:50:10 +02:00
Bartosz Taudul
ffe0047f8c Detect embeddings-capable models. 2025-07-12 11:50:10 +02:00
Bartosz Taudul
95d2aa9a22 Set content type in POST request. 2025-07-12 11:50:10 +02:00
Bartosz Taudul
931bc97787 Trimming tool response now properly handles UTF-8.
This is important to have, as otherwise json parser will fail.
2025-07-12 11:50:10 +02:00
Bartosz Taudul
a1b67e4299 Retrieve the model context size for use in UI and tools. 2025-07-12 11:50:09 +02:00
Bartosz Taudul
b33110e53e Retrieve context size for LM Studio models. 2025-07-12 11:50:09 +02:00
Bartosz Taudul
1d4bdfc8c3 Handle stop streaming requests in a more valid way. 2025-07-12 11:50:09 +02:00
Bartosz Taudul
fba21c1854 Filter out LM Studio embedding models. 2025-07-12 11:50:09 +02:00
Bartosz Taudul
fc9d787cf9 Move curl context setup to a separate function. 2025-07-12 11:50:09 +02:00
Bartosz Taudul
602a675bf4 Remove ugly advice about downloading LLM models. 2025-07-12 11:50:09 +02:00
Bartosz Taudul
3a27bcb8a9 Add system prompt tag.
This helps shut up gemma3 in LM Studio. Ollama doesn't need this.
2025-07-12 11:50:09 +02:00
Bartosz Taudul
aea3ad4730 Fix chat completions stop flow. 2025-07-12 11:50:09 +02:00
Bartosz Taudul
5f8c38a268 Include tool output in context size calculation. 2025-07-12 11:50:08 +02:00
Bartosz Taudul
782dc7de8d Direct the LLM to inform the user about enabling network access. 2025-07-12 11:50:08 +02:00
Bartosz Taudul
16eaf114a6 Don't duplicate network check code. 2025-07-12 11:50:08 +02:00
Bartosz Taudul
203e5e2b13 Add preset endpoint addresses for various LLM providers. 2025-07-12 11:50:08 +02:00
Bartosz Taudul
b398a4641a Switch from Ollama API to OpenAI API commonly used by all LLM providers. 2025-07-12 11:50:08 +02:00
Bartosz Taudul
b05bbc7f53 Enable CURLOPT_NOSIGNAL. 2025-07-12 11:50:08 +02:00
Bartosz Taudul
580423225e Get nlohmann json via CPM. 2025-07-12 11:50:08 +02:00
Bartosz Taudul
eae3c7ef80 Remove LLM config from global settings (leave just LLM checkbox). 2025-07-12 11:50:08 +02:00
Bartosz Taudul
a4418bf50b Move libcurl init to TracyLlm.cpp. 2025-07-12 11:50:07 +02:00
Bartosz Taudul
0f78084f8f Add dictionary support. 2025-07-12 11:50:07 +02:00
Bartosz Taudul
6d8d461f2b Extract calculation of max tool output size. 2025-07-12 11:50:07 +02:00
Bartosz Taudul
98e9383c89 Print language specifier in code blocks. 2025-07-12 11:50:07 +02:00
Bartosz Taudul
ea956f4cb2 Bullet points in markdown are '*' or '-'. 2025-07-12 11:50:07 +02:00
Bartosz Taudul
c0e89f992d Extend big font characters range. 2025-07-12 11:50:07 +02:00
Bartosz Taudul
43463abdfe Add bold, italic and bold+italic font. 2025-07-12 11:50:07 +02:00
Bartosz Taudul
2f9436577e Use global font structure. 2025-07-12 11:50:07 +02:00
Bartosz Taudul
183847821e Ignore annoying clang-tidy rules. 2025-07-12 11:50:06 +02:00
Bartosz Taudul
654243eeea Use embed utility to provide fonts. Replace Droid Sans with Roboto. 2025-07-12 11:50:06 +02:00
Bartosz Taudul
78a80b64fa Remove explicit spacing hacks.
The new text wrapped functionality works in a way that already does this.
2025-07-12 11:50:06 +02:00
Bartosz Taudul
64c0d645ee Render inline code fragments with fixed width font. 2025-07-12 11:50:06 +02:00
Bartosz Taudul
d5f732e768 Add ImGui::SameLine() capable wrapped text printing function.
Adapted from imgui_markdown.
2025-07-12 11:50:06 +02:00