Skip to content

Commit 88dcd58

Browse files
committed
fix:删除多余调试输出
1 parent 4c3d32e commit 88dcd58

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

astrbot/core/provider/sources/openai_source.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -315,16 +315,12 @@ async def _query_stream(
315315
if not choice.delta or not choice.delta.tool_calls:
316316
continue
317317
for tool_call in choice.delta.tool_calls:
318-
if hasattr(tool_call, "type") and tool_call.type is None:
318+
if getattr(tool_call, "type", None) in (None, ""):
319319
tool_call.type = "function"
320320

321321
try:
322322
state.handle_chunk(chunk)
323323
except Exception as e:
324-
logger.debug(
325-
f"Saving chunk state error: {type(e).__name__}: {e}. Chunk data: {chunk}",
326-
exc_info=True,
327-
)
328324
logger.warning(f"Saving chunk state error: {e}")
329325
if len(chunk.choices) == 0:
330326
continue

0 commit comments

Comments
 (0)