mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-05-19 08:00:25 +00:00
fix quotes
This commit is contained in:
parent
d9724a4caa
commit
c984147c84
1 changed files with 2 additions and 1 deletions
|
|
@ -3232,7 +3232,8 @@ def toolcall_to_normalized_json(text,start_tag,end_tag): #convert weird formats
|
|||
if text.startswith("call:"):
|
||||
text = text[len("call:"):]
|
||||
text = text.replace('<|"|>', '!$$REAL_QUOTE$$!')
|
||||
text = text.replace('\"', '\\"')
|
||||
text = text.replace('\\', '\\\\')
|
||||
text = text.replace('"', '\\"')
|
||||
text = text.replace('!$$REAL_QUOTE$$!','"')
|
||||
fn_match = re.match(r'^([a-zA-Z_][a-zA-Z0-9_]*)\{(.*)\}$', text.strip(), re.DOTALL) # extract fn name
|
||||
if not fn_match:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue