Replies: 1 comment
-
🤖 Hello, The error message you're seeing is indicating that the In your code, you're passing an object with a const result = await chain.call({
message,
}); However, the const result = await chain.call({
question: message,
}); This should resolve the error you're seeing. Also, please note that the const result = await chain.call({
question: message,
chat_history: [
{ role: 'system', content: 'You are a helpful assistant.' },
{ role: 'user', content: 'Who won the world series in 2020?' },
{ role: 'assistant', content: 'The Los Angeles Dodgers won the World Series in 2020.' },
// Add the new user message here
{ role: 'user', content: message },
],
}); I hope this helps! Let me know if you have any other questions. Sources
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am using Next.js and apparently the code is not finding my question?
What do I need to change or add to make this code work?
Error:
code:
Beta Was this translation helpful? Give feedback.
All reactions