Skip to content

Commit d54de9c

Browse files
committed
fix(core): remove empty arugments
1 parent c887bb3 commit d54de9c

File tree

1 file changed

+4
-1
lines changed
  • src/server/core/acontext_core/schema/session

1 file changed

+4
-1
lines changed

src/server/core/acontext_core/schema/session/message.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ def pack_part_line(
2424
r = f"{header} {part.text}"
2525
elif part.type == "tool-call":
2626
tool_call_meta = ToolCallMeta(**part.meta)
27-
if isinstance(tool_call_meta.arguments, str):
27+
if (
28+
isinstance(tool_call_meta.arguments, str)
29+
and tool_call_meta.arguments.strip() != ""
30+
):
2831
arguments = json.loads(tool_call_meta.arguments)
2932
else:
3033
arguments = tool_call_meta.arguments

0 commit comments

Comments
 (0)