Archived
Parse HYV3 native sectioned tool calls and tagged arguments
Use the existing RadChatFormat fields for the outer tool-call section, name separator and tagged values. Cover grammar, template replay, streaming at every truncation, section boundaries and OpenAI response lifting; leave the supports_reasoning adapter unchanged.
This commit is contained in:
1 parent
7621e4ac2b
commit
7e04bcac2b
11 files changed
+840
-34
No files matched your search
+3
-4
@@ -1509,14 +1509,13 @@ typedef struct RadChatFormat {
|
||||
const char* reasoning_open; /* "" when the model does not reason */
|
||||
const char* reasoning_close;
|
||||
/* Literals that end a reasoning block the model forgot to close, when a call starts there.
|
||||
* Each must be the call opener: `call_open`, or `name_prefix` when there is no call_open. */
|
||||
* Each must be a call opener (`call_open`, or `name_prefix` without one) or section_open. */
|
||||
const char* const* reasoning_breaks;
|
||||
uint32_t n_reasoning_breaks;
|
||||
uint32_t reasoning_in_prompt; /* RAD_CHAT_THINK_* */
|
||||
|
||||
/* Around all of a turn's calls, and between two calls beyond whitespace. The parser does not
|
||||
* read these yet, so a format that sets one is refused at startup by name; they are fields so
|
||||
* supporting them later does not change the struct. */
|
||||
/* Around the complete list of calls. section_open and section_close must be set together.
|
||||
* call_separator is additional text between calls beyond whitespace; it is not supported. */
|
||||
const char* section_open;
|
||||
const char* section_close;
|
||||
const char* call_separator;
|
||||
|
||||
Reference in new issue
Block a user