Could you help me providing a minimal example on how to create a pass through LangChain Code node for an AI Model?
I would like to create a node that has a Language Model as both Input and Ouput, and acts as a merely passthrough, so I can study it, and try to alter the output of the Model.
What is the error message (if any)?
With the current example, I get: Problem in node ‘Summarization Chain‘ Unable to extract BaseLanguageModel from llmLike object.
Please share your workflow
This is what I currently have, but it does not work:
Hi @miguel-mconf,
The problem you’re seeing is due to the LLM input configuration. If Max Connections is set to -1, the const llm = await this.getInputConnectionData('ai_languageModel', 0); would return an array inputs. So you would need to return it as llm[0]. But if you know you’re only going to use a single LLM for the passthrough, I would suggest to set it to 1 which would make your code work as expected.