Commit Graph

3907 Commits

Author SHA1 Message Date
Olivier Chafik
c36a196f53 tool-call: prepare possible externalization of minja + factor tool call style out of template 2024-10-01 23:12:24 +01:00
ochafik
d9451fd647 antiprompts: avoid c++20 struct initializers in test 2024-09-30 04:08:55 +01:00
ochafik
0fc5ad7ae1 minja: avoid c++20 struct initializers in test 2024-09-30 03:51:48 +01:00
ochafik
277f38536c minja: attempt to handle windows' crlf 2024-09-30 03:45:50 +01:00
ochafik
9ac4b04aa2 tool-call: add fs_list_files to common, w/ win32 impl for msys2 build 2024-09-29 00:42:52 +01:00
ochafik
cb7912ee74 chat-template: add phi-3.5-vision-instruct 2024-09-29 00:33:19 +01:00
ochafik
8738d94bbd minja: qualify std::nullptr_t type for msys2 build 2024-09-29 00:18:22 +01:00
ochafik
c87c12168a tool-call: fix memory leak in test 2024-09-28 23:44:28 +01:00
ochafik
22493c8e9e tests: fix test-chat-template run from build 2024-09-28 23:31:23 +01:00
ochafik
ad6719e2a7 tests: fix typo 2024-09-28 23:26:19 +01:00
ochafik
a072f30a8d tests: attempt to find assets for tests run from build subfolder 2024-09-28 23:15:36 +01:00
ochafik
bc3e0c0830 tool-call: Qwen 2.5 Instruct also requires object arguments 2024-09-28 23:05:35 +01:00
ochafik
b10ef04d8d chat-template: tweak --chat-template error message when --jinja is set 2024-09-28 22:36:38 +01:00
ochafik
dbda025f87 tool-call: test messages -> template -> grammar -> tool call parser 2024-09-28 22:32:47 +01:00
ochafik
0ae1112faa agent: try to fix pyright lint 2024-09-28 20:10:08 +01:00
ochafik
1b32ac129f chat-template: fix test-arg 2024-09-28 20:06:10 +01:00
ochafik
9358d1f62c minja: fix gcc8 build of test 2024-09-28 19:50:08 +01:00
ochafik
e6be59c2a0 antiprompts: fix gcc8 build (avoid recursive struct) 2024-09-28 19:39:52 +01:00
ochafik
ef2a020276 tool-call: make agent async 2024-09-28 19:11:09 +01:00
ochafik
05bbba9f8a tool-call: only match json eagerly for Llama 3.2 2024-09-28 19:05:10 +01:00
ochafik
6e0053a81b chat-template: enumerate files w/ C API rather than private using std::__fs::filesystem 2024-09-28 18:47:11 +01:00
ochafik
c657857e21 tool-call: cleanup tools.py 2024-09-28 18:33:40 +01:00
ochafik
55cf337560 tool-call: better error reporting for server tests 2024-09-28 18:33:40 +01:00
ochafik
7cef90cf9c tool-call: more eager function call parsing for Functionary & Llama (give a chance to 3B model) 2024-09-28 18:33:40 +01:00
ochafik
8b2cf3509f tool-call: fix grammar trigger crash 2024-09-28 18:30:01 +01:00
ochafik
d983516f40 tool-call: let the tool call handler expand chat template, moving builtin_tools down as extra_context 2024-09-28 17:46:36 +01:00
ochafik
0c85bc7a8f tool-call: test tool call style detection 2024-09-28 17:43:09 +01:00
ochafik
887951beb0 minja: generate chat goldens w/ fixed date to support Llama-3.2-3B-Instruct (uses strftime_now) 2024-09-27 19:52:15 +01:00
ochafik
701b664551 minja: add indent filter to support command-r-plus's chat templates 2024-09-27 19:00:14 +01:00
ochafik
0093a5e527 minja: fix identifiers parsing (when start w/ not/is/etc) and lstrip_blocks corner case (needed by DeepSeek-V2.5 2024-09-27 18:30:44 +01:00
ochafik
2f25ee30ef Update README.md 2024-09-27 07:18:07 +01:00
ochafik
86e4f99092 Update README.md 2024-09-27 07:15:25 +01:00
ochafik
e62b5de3cf tool-call: fix functionary-small-3.2 (first tool starts w/ name\n, subsequent are >>>name\n) 2024-09-27 07:06:33 +01:00
ochafik
e33b342da7 tool-call: fix passing of tools to template + allow agent to finish 2024-09-27 06:24:22 +01:00
ochafik
f62e688387 tool-call: fix crash / test non-tool call case (added llama_sampler_is_grammar_empty) 2024-09-27 06:04:41 +01:00
ochafik
0abfa36ca7 tool-call: move usage examples to examples/agent 2024-09-27 05:10:30 +01:00
ochafik
6610ecf965 server: rm bad debug code 2024-09-27 04:07:35 +01:00
ochafik
27cd07a056 json: fix grammar conversion typo 2024-09-27 03:57:48 +01:00
ochafik
9295ca95db tool-call: fix agent type lints 2024-09-27 03:53:56 +01:00
ochafik
1e5c0e747e chat-template: fix jinja tests (make safe a passthrough) 2024-09-27 03:50:04 +01:00
ochafik
f9c1743bb5 minja: fix iterables 2024-09-27 03:36:49 +01:00
ochafik
8299fac07c tool-call: adapt very simple agent + docker isolation from https://github.com/ggerganov/llama.cpp/pull/6389 2024-09-26 21:07:46 +01:00
ochafik
10f9fe8d49 tool-call: fix tool call return format 2024-09-26 21:01:04 +01:00
ochafik
c88c932d98 fix gcc error + lint 2024-09-26 19:18:40 +01:00
ochafik
2926089c5d fix lints 2024-09-26 19:06:29 +01:00
ochafik
5840e10069 tool-call: merge & fix jinja template tests into test-chat-template 2024-09-26 19:05:00 +01:00
ochafik
50685f837f minja: add str.title() 2024-09-26 19:03:59 +01:00
ochafik
296331bba3 minja: update chat template goldens w/ llama.3.1 arguments workaround 2024-09-26 18:10:27 +01:00
ochafik
9cfe4d7202 tool-call: refactor llama_chat_template class + use in validate_model_chat_template 2024-09-26 18:06:03 +01:00
ochafik
cf7bece6a7 tool-call: factor chat template away from legacy API 2024-09-26 17:19:29 +01:00