[BUG] - Tracing for Langchain functions agent fails. #3118
Labels
bug
Something isn't working
no-recent-activity
There has been no recent activity on this issue/pull request
Describe the bug
The tracing fails for Langchain OpenAI function agent. I have a openai functions agent that uses langchain tools as functions. The tracing fails after a function call from the agent.
How To Reproduce the bug
Steps to reproduce the behavior, how frequent can you experience the bug: Always
Expected behavior
The flow should tun without any error.
Actual behavior
The flow fails with the following error
Running Information(please complete the following information):
pf -v
:mcr.microsoft.com/devcontainers/python:3.9
)python --version
: Python 3.9.19Additional context
This is what i was able to debug so far.
These are the messages after a function call going to the
get_openai_metrics_for_chat_api
function .When content field is
None
for the message that is a function call, the call to tiktoken fails.The text was updated successfully, but these errors were encountered: