JS/TS Langchain SDK - Langfuse
Hey there, Im using the JS/Lanchain version of the library and hitting a few road bumps > https://langfuse.com/docs/integrations/langchain/typescript#create-a-simple-llm-call-using-langchain docs dont 100% lineup with what langchain is expecting w.g.
new LLMChain
is expecting 1 object but the docs have 2. There is a callback function inside of that object but when I add it I get Type 'CallbackHandler' is missing the following properties from type 'BaseCallbackHandler': lc_serializable, awaitHandlers
. Docs make it look easy to integrate but cant quite get it to come together.JS/TS Langchain SDK - Langfuse
Fully async and typed SDK, runs in Node.js, edge, Deno
38 Replies
Happy to share move info if its useful
Thanks, currently having a look
Do you get the same error when adding the handler to the .run?
Currently upgrading our tests as the error sounds to me like there was a change in the interface of the Langchain handlers for JS
Yeah same thing on the call
"langchain": "^0.0.150",
What version are your tests on?does the run take a second argument?
it was on 0.0.133, just now upgrading to 0.0.157
Yeah the call can take the second
ill go back to 133 and test that on my end
on which version of the langfuse-langchain sdk are you? (just to double check)
"langfuse-langchain": "^1.0.22",
Trying to reproduce on langfuse-langchain 1.0.22 and langchain 0.0.157; I do not get type errors
good catch with the LLMChain not taking two arguments while the .run takes two, I'll update the docs
did you get the same error?
Yeah same error, nuked node_modules just in case as well.
Must be something on my end then.
are you on typescript?
I am, apps is built in nestjs
Happy to check if I get the same error with your tsconfig