Describe the problem/error/question
Hi, I'm encountering an issue while attempting to use the langchain code node with a sub-workflow tool. The code is based on the example from Quickstart | 🦜️🔗 Langchain. Please see the attached workflow.
What is the error message (if any)?
It appears the tool is not being implemented correctly. When I tried to log the result of the custom tool invocation, I received the following message:
[
{
"lc": 1,
"type": "not_implemented",
"id": [
"langchain",
"tools",
"DynamicTool"
]
}
]
I'm
Please share your workflow
Share the output returned by the last node
[
{
"output": {
"lc": 1,
"type": "constructor",
"id": [
"langchain_core",
"messages",
"AIMessage"
],
"kwargs": {
"content": "",
"additional_kwargs": {
"tool_calls": [
{
"id": "call_Bl7S32df8y4p3DeoQYSg9zpF",
"type": "function",
"function": {
"name": "fetch_linkedin_profile",
"arguments": "{"input":"https://example/result.json"}"
}
}
]
}
}
}
}
]
Information on your callin.io setup
- callin.io version: 1.38.1
- Database (default: SQLite): Postgres
- callin.io EXECUTIONS_PROCESS setting (default: own, main): Default
- Running callin.io via (Docker, npm, callin.io cloud, desktop app): Docker
- Operating system: Debian
Hi, welcome to the community!
There is indeed a bug that prevents custom callin.io tools from executing when using the Langchain code node. I've just pushed a fix and it will be included in the next release (a message will be sent to this channel once it's available).
However, there's also a minor issue with your code: you are not actually executing the function that the LLM suggests. To do this, you'll need to manually extract the toolName
, match it to one of the connected tools, and execute it with the arguments provided by the LLM. Here's a slightly modified workflow with these changes:
Once the fix I mentioned above is released, this should function as expected.
Thank you. The provided code will certainly guide me on the right path. I’m waiting for the fix to test deeper.
A new version callin.io@1.40.0
has been released, which incorporates GitHub PR 9265.
This discussion was automatically closed 90 days following the last response. New replies are no longer permitted.