The ToolMessage blocks are logged but not returned in the output stream ...
|
# Messages sent back by a tool |
|
case ToolMessage(): |
|
for b in m.content_blocks: |
|
match b["type"]: |
|
case "text": |
|
self.logger.info(b["text"]) |
|
case "invalid_tool_call": |
|
self.logger.error(b) |
|
case _: |
|
self.logger.debug(f"ToolMessage: {m}") |
We don't want to send these to the frontend but generate_streaming_response() is also used in the LangSmith evaluation runs it would be useful to get the tool call and the tool response in the experiment outputs to get a better picture to debug where a problem might be.
Either generate_streaming_response() needs to return more blocks or run_langsmith_evalutions.py needs to call a different (helper) function.
The
ToolMessageblocks are logged but not returned in the output stream ...tenantfirstaid/backend/tenantfirstaid/langchain_chat_manager.py
Lines 207 to 216 in df26b7d
We don't want to send these to the
frontendbutgenerate_streaming_response()is also used in the LangSmith evaluation runs it would be useful to get the tool call and the tool response in the experiment outputs to get a better picture to debug where a problem might be.Either
generate_streaming_response()needs to return more blocks orrun_langsmith_evalutions.pyneeds to call a different (helper) function.