Skip to content

Commit c16b572

Browse files
fix: Check function for None
1 parent 8562231 commit c16b572

File tree

1 file changed

+3
-1
lines changed
  • agents-api/agents_api/routers/sessions

1 file changed

+3
-1
lines changed

agents-api/agents_api/routers/sessions/chat.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,9 @@ async def chat(
184184
k: v
185185
for k, v in function.model_dump().items()
186186
if k not in ["name", "type"]
187-
},
187+
}
188+
if function is not None
189+
else {},
188190
},
189191
}
190192
formatted_tools.append(tool)

0 commit comments

Comments
 (0)