Commit graph

349 commits

Author SHA1 Message Date
oobabooga
044566d42d API: Add tool call parsing for DeepSeek, GLM, MiniMax, and Kimi models 2026-03-06 15:06:56 -03:00
oobabooga
eba262d47a Security: prevent path traversal in character/user/file save and delete 2026-03-06 02:00:10 -03:00
oobabooga
8a9afcbec6 Allow extensions to skip output post-processing 2026-03-06 01:19:46 -03:00
oobabooga
8d43123f73 API: Fix function calling for Qwen, Mistral, GPT-OSS, and other models
The tool call response parser only handled JSON-based formats, causing
tool_calls to always be empty for models that use non-JSON formats.

Add parsers for three additional tool call formats:
- Qwen3.5: <tool_call><function=name><parameter=key>value</parameter>
- Mistral/Devstral: functionName{"arg": "value"}
- GPT-OSS: <|channel|>commentary to=functions.name<|message|>{...}

Also fix multi-turn tool conversations crashing with Jinja2
UndefinedError on tool_call_id by preserving tool_calls and
tool_call_id metadata through the chat history conversion.
2026-03-06 00:55:33 -03:00
oobabooga
e2548f69a9 Make user_data configurable: add --user-data-dir flag, auto-detect ../user_data
If --user-data-dir is not set, auto-detect: use ../user_data when
./user_data doesn't exist, making it easy to share user data across
portable builds by placing it one folder up.
2026-03-05 19:31:10 -08:00
oobabooga
4c406e024f API: Speed up chat completions by ~85ms per request 2026-03-05 18:36:07 -08:00
Sense_wang
7bf15ad933
fix: replace bare except clauses with except Exception (#7400) 2026-03-04 18:06:17 -03:00
oobabooga
f010aa1612 Replace PyPDF2 with pymupdf for PDF text extraction
pymupdf produces cleaner text (e.g. no concatenated words in headers),
handles encrypted and malformed PDFs that PyPDF2 failed on, and
supports non-Latin scripts.
2026-03-04 06:43:37 -08:00
q5sys (JT)
7493fe7841
feat: Add a dropdown to save/load user personas (#7367) 2026-01-14 20:35:08 -03:00
oobabooga
b4f06a50b0 fix: Pass bos_token and eos_token from metadata to jinja2
Fixes loading Seed-Instruct-36B
2025-12-04 19:11:31 -08:00
oobabooga
49c60882bf Image generation: Safer image uploading 2025-12-03 16:07:51 -08:00
oobabooga
655c3e86e3 Fix "continue" missing an initial space in chat-instruct/chat modes 2025-10-11 17:00:25 -07:00
oobabooga
c7dd920dc8 Fix metadata leaking into branched chats 2025-10-11 14:12:05 -07:00
oobabooga
0d03813e98
Update modules/chat.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-09 21:01:13 -03:00
oobabooga
282aa19189 Safer profile picture uploading 2025-10-09 09:26:35 -07:00
Remowylliams
38a7fd685d
chat.py fixes Instruct mode History 2025-10-05 11:34:47 -03:00
oobabooga
3a3e247f3c Even better way to handle continue for thinking blocks 2025-08-30 12:36:35 -07:00
oobabooga
cf1aad2a68 Fix "continue" for Byte-OSS for partial thinking blocks 2025-08-30 12:16:45 -07:00
oobabooga
02ca96fa44 Multiple fixes 2025-08-25 22:17:22 -07:00
oobabooga
6a7166fffa Add support for the Seed-OSS template 2025-08-25 19:46:48 -07:00
oobabooga
8fcb4b3102 Make bot_prefix extensions functional again 2025-08-25 19:10:46 -07:00
oobabooga
8f660aefe3 Fix chat-instruct replies leaking the bot name sometimes 2025-08-25 18:50:16 -07:00
oobabooga
a531328f7e Fix the GPT-OSS stopping string 2025-08-25 18:41:58 -07:00
oobabooga
b657be7381 Obtain stopping strings in chat mode 2025-08-25 18:22:08 -07:00
oobabooga
ded6c41cf8 Fix impersonate for chat-instruct 2025-08-25 18:16:17 -07:00
oobabooga
c1aa4590ea Code simplifications, fix impersonate 2025-08-25 18:05:40 -07:00
oobabooga
b330ec3517 Simplifications 2025-08-25 17:54:15 -07:00
oobabooga
aad0104c1b Remove a function 2025-08-25 17:33:13 -07:00
oobabooga
f919cdf881 chat.py code simplifications 2025-08-25 17:20:51 -07:00
oobabooga
d08800c359 chat.py improvements 2025-08-25 17:03:37 -07:00
oobabooga
3bc48014a5 chat.py code simplifications 2025-08-25 16:48:21 -07:00
oobabooga
64eba9576c mtmd: Fix a bug when "include past attachments" is unchecked 2025-08-17 14:08:40 -07:00
oobabooga
b62c8845f3 mtmd: Fix /chat/completions for llama.cpp 2025-08-11 12:01:59 -07:00
oobabooga
0ea62d88f6 mtmd: Fix "continue" when an image is present 2025-08-09 21:47:02 -07:00
oobabooga
d86b0ec010
Add multimodal support (llama.cpp) (#7027) 2025-08-10 01:27:25 -03:00
oobabooga
a6d6bee88c Change a comment 2025-08-09 07:51:03 -07:00
oobabooga
2fe79a93cc mtmd: Handle another case after 3f5ec9644f 2025-08-09 07:50:24 -07:00
oobabooga
3f5ec9644f mtmd: Place the image <__media__> at the top of the prompt 2025-08-09 07:06:07 -07:00
oobabooga
8fcadff8d3 mtmd: Use the base64 attachment for the UI preview instead of the file 2025-08-08 20:13:54 -07:00
Katehuuh
88127f46c1
Add multimodal support (ExLlamaV3) (#7174) 2025-08-08 23:31:16 -03:00
oobabooga
3e24f455c8 Fix continue for GPT-OSS (hopefully the final fix) 2025-08-06 10:18:42 -07:00
oobabooga
0c1403f2c7 Handle GPT-OSS as a special case when continuing 2025-08-06 08:05:37 -07:00
oobabooga
6ce4b353c4 Fix the GPT-OSS template 2025-08-06 07:12:39 -07:00
oobabooga
7c82d65a9d Handle GPT-OSS as a special template case 2025-08-05 18:05:09 -07:00
oobabooga
fbea21a1f1 Only use enable_thinking if the template supports it 2025-08-05 17:33:27 -07:00
oobabooga
20adc3c967 Start over new template handling (to avoid overcomplicating) 2025-08-05 16:58:45 -07:00
oobabooga
80f6abb07e Begin fixing 'Continue' with GPT-OSS 2025-08-05 16:01:19 -07:00
oobabooga
e5b8d4d072 Fix a typo 2025-08-05 15:52:56 -07:00
oobabooga
7d98ca6195 Make web search functional with thinking models 2025-08-05 15:44:33 -07:00
oobabooga
498778b8ac Add a new 'Reasoning effort' UI element 2025-08-05 15:19:11 -07:00