langchain
22aa5e07 - standard-tests: Fix ToolsIntegrationTests to correctly handle "content_and_artifact" tools (#29391)

Commit
1 year ago
standard-tests: Fix ToolsIntegrationTests to correctly handle "content_and_artifact" tools (#29391) **Description:** The response from `tool.invoke()` is always a ToolMessage, with content and artifact fields, not a tuple. The tuple is converted to a ToolMessage here https://github.com/langchain-ai/langchain/blob/b6ae7ca91dd0f54f58475463804540ad25eeea7d/libs/core/langchain_core/tools/base.py#L726 **Issue:** Currently `ToolsIntegrationTests` requires `invoke()` to return a tuple and so standard tests fail for "content_and_artifact" tools. This fixes that to check the returned ToolMessage. This PR also adds a test that now passes.
Author
Parents
Loading