fix: google parser, llm handler and other errors

This commit is contained in:
Siddhant Rai committed 2025-01-17 09:22:41 +05:30
1 parent 811dfecf98
commit c97d1e3363
4 files changed
+141 -102

No files matched your search

+2 -2
View File
@@ -89,7 +89,7 @@ class Agent:
if isinstance(resp, str):
yield resp
return
if resp.message.content:
if hasattr(resp, "message") and hasattr(resp.message, "content"):
yield resp.message.content
return
@@ -98,7 +98,7 @@ class Agent:
# If no tool calls are needed, generate the final response
if isinstance(resp, str):
yield resp
elif resp.message.content:
elif hasattr(resp, "message") and hasattr(resp.message, "content"):
yield resp.message.content
else:
completion = self.llm.gen_stream(