mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2026-04-07 15:43:49 +00:00
Fix GPT-OSS tool-calling after 9ec20d97
This commit is contained in:
parent
5814e745be
commit
750502695c
1 changed files with 3 additions and 4 deletions
|
|
@ -72,10 +72,9 @@ def extract_reasoning(text, html_escaped=False):
|
|||
if content_pos != -1:
|
||||
content_start = content_pos + len(content_esc)
|
||||
else:
|
||||
# Content tag expected but not yet present (e.g. partial
|
||||
# streaming) — suppress intermediate tags between end_tag
|
||||
# and content_tag so they don't leak as content.
|
||||
content_start = len(text)
|
||||
# Content tag not present — fall back to content after
|
||||
# end_tag (e.g. GPT-OSS tool calls skip the final channel).
|
||||
content_start = end_pos + len(end_esc)
|
||||
else:
|
||||
content_start = end_pos + len(end_esc)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue