I'm using livekit agents and I'm not seeing tool c...
# ask-ai
s
I'm using livekit agents and I'm not seeing tool calls in the history even though they are executing just fine
Copy code
messages_with_timestamp = session.history.to_dict(exclude_timestamp=False, exclude_function_call=False)
                print('messages_with_timestamp', messages_with_timestamp)
would this not include the tools as part of the history?
t
Thanks for reaching out, Drew. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
The behavior you're observing is likely due to the
exclude_function_call
parameter in the
to_dict
method. When this parameter is set to
True
, it filters out items of type "function_call" and "function_call_output" from the chat history. If you want to include tool calls in the history, ensure that
exclude_function_call
is set to
False
when calling
to_dict
. This should allow the tool calls to appear in the history as expected. Sources: GitHub::livekit::agents | livekit-plugins/livekit-plugins-google/livekit/pl...
s
as you can see above I am doing that
t
Hey there! I totally get your frustration. Sometimes, even when you set
exclude_function_call=False
, things might not work exactly as you expect. It's like the code has its own mind sometimes šŸ˜…. There could be some internal logic that's quietly changing your setting – maybe when converting chat contexts for specific providers like Google, the
exclude_function_call
might automatically get set to
True
. My advice? Take a peek under the hood and double-check the implementation. Make sure no other part of the code is sneaking in and overriding your parameter. It's a bit like detective work, but I'm confident you'll get to the bottom of it! If you need any help tracing this down, just give me a shout. We'll solve this together! šŸ•µļøā€ā™€ļøšŸ¤ Sources: GitHub::livekit::agents | livekit-plugins/livekit-plugins-google/livekit/pl...
s
I did check and it doesn't appear that the tool made it in
t
Hey there! I totally understand you're trying to troubleshoot something with your LiveKit agents, and I'm here to help you get to the bottom of it. 😊 Could you walk me through a few details about your setup? I'd love to hear more: • Are you using any custom implementations or modifications to the LiveKit agents? • What specific tools are being called, and are they returning outputs as expected? • Are there any errors or warnings in the logs related to the tool calls? The more info you can share, the better we can pinpoint why those tool calls might be playing hide and seek in your history. Let's solve this together! šŸ•µļøā€ā™€ļø
I don't have the answer you're looking for. You could also try asking your question: • in one of the other Slack channels or • to https://deepwiki.com/livekit/livekit_composite which is trained on all LiveKit source code If you find the answer, please post it here to help others!