mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-04-28 03:30:20 +00:00
jinja tool streaming is now finally working
This commit is contained in:
parent
c4abba8868
commit
6556161804
1 changed files with 3 additions and 1 deletions
|
|
@ -175,7 +175,7 @@ tool_call_pairs = [
|
|||
("<|tool_call_begin|>", "<|tool_call_end|>"),
|
||||
("<|tool▁call▁begin|>", "<|tool▁call▁end|>"),
|
||||
("<minimax:tool_call>", "</minimax:tool_call>"),
|
||||
("<|tool_call>call:", "<tool_call|>"),
|
||||
("<|tool_call>", "<tool_call|>"),
|
||||
]
|
||||
|
||||
saved_stdout = None
|
||||
|
|
@ -3224,6 +3224,8 @@ def toolcall_to_normalized_json(text,start_tag,end_tag): #convert weird formats
|
|||
return text
|
||||
return json.dumps(results) if len(results) > 1 else json.dumps(results[0])
|
||||
def parse_gemma4(text: str) -> str:
|
||||
if text.startswith("call:"):
|
||||
text = text[len("call:"):]
|
||||
text = text.replace('<|"|>', '!$$REAL_QUOTE$$!')
|
||||
text = text.replace('\"', '\\"')
|
||||
text = text.replace('!$$REAL_QUOTE$$!','"')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue