mirror of
https://github.com/AstrBotDevs/AstrBot
synced 2026-07-17 09:50:31 +08:00
fix: reasoning_content None guard in openai_source think part parsing
This commit is contained in:
@@ -1012,7 +1012,9 @@ class ProviderOpenAIOfficial(Provider):
|
||||
for part in message["content"]:
|
||||
if part.get("type") == "think":
|
||||
reasoning_content_present = True
|
||||
reasoning_content += str(part.get("think"))
|
||||
reasoning_content = (reasoning_content or "") + str(
|
||||
part.get("think")
|
||||
)
|
||||
else:
|
||||
new_content.append(part)
|
||||
# Some providers (Grok, etc.) reject empty content lists.
|
||||
|
||||
Reference in New Issue
Block a user