TypeError: Expected a Runnable, callable or dict. Instead got an unsupported type: <class 'list'> #27354
Unanswered
Rajat-2001
asked this question in
Q&A
Replies: 1 comment
-
There isn't enough context to help. I suggest you try to create a minimal reproducible example. In doing so, you will also likely identify the bug in the code. I'm seeing a lot of |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have been trying to declare the self.chain variable using the following techniques but none of them works.
self.chain = RunnableSequence([
self.prompt_template, # This is already a Runnable
RunnableLambda(lambda inputs: {"text": self.generator.generate(inputs["prompt"])}) # Wrap the generator call properly
])
self.chain = RunnableSequence([self.prompt_template, Runnable(self.generator)])
self.chain = LLMChain(
llm=self.generator, # Use your LLaMA model instance
prompt=self.prompt_template # Use the prompt template instance
)
self.chain = RunnableSequence([self.prompt_template, self])
self.chain = RunnableSequence([self.prompt_template, self])
self.chain = RunnableSequence([Runnable(self.prompt_template), Runnable(self)])
I always get the TypeError
Beta Was this translation helpful? Give feedback.
All reactions