Find answers from the community

Updated 4 weeks ago

Tools

gemini also lacks text blocks when performing function calls
Plain Text
ChatMessage(role=<MessageRole.USER: 'user'>, additional_kwargs={}, blocks=[TextBlock(block_type='text', text='I want you to create a paste of your choice about global warming and then shorten the link of the paste and paste it to my clipboard')]),



 ChatMessage(role=<MessageRole.ASSISTANT: 'assistant'>, additional_kwargs={'tool_calls': [name: "create_paste"
 args {
   fields {
     key: "paste_code"
     value {
       string_value: "Global warming is a serious threat to our planet. We must take action to reduce our carbon footprint and protect our environment."
     }
   }
   fields {
     key: "name"
     value {
       string_value: "Global Warming Awareness"
     }
   }
 }
 ]}, blocks=[])
L
F
20 comments
This is expected i think
The tool call goes into additional kwargs, llm.get_tool_calls_from_response parses that out
does the kwargs get sent back to the llm after the tool call?
it doesnt register its own tool call
Hmm, they should. :sigh: let me look at the Google docs for this again today
Switch to the react agent
I think i noticed this when testing too, but i just engineered my tool output around the bug. But I see the fix now
same here haha
started making outputs more descriptive
Works very well with this change
Appreciate the patience here πŸ™ This will publish/release as soon as it merges
Thank you πŸ‘Œ
in gemini there is no text property
it seems unnecessary
Gemini has a text content block part
If you mix text and function calls and images, pretty sure it's needed?
Their docs use Part.from_text()
oo yes, makes sense
Add a reply
Sign up and join the conversation on Discord