mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2026-03-26 15:24:39 +01:00
Fix GPT-OSS tool-calling after 9ec20d97
This commit is contained in:
parent
5814e745be
commit
750502695c
|
|
@ -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…
Reference in a new issue