Replies: 1 comment
-
🤖 Hello Jack, The issue you're experiencing is due to the way the In your current implementation, the However, please note that storing personal data like this may have privacy implications and should be done in accordance with relevant data protection laws and regulations. Here's an example of how you might modify the const memory = new BufferMemory({
memoryKey: "chat_history",
inputKey: "question",
outputKey: "text",
userName: "Jack" // Add this line
}); Then, in your result = await chain.call({
question: message,
chat_history: chatHistory,
userName: "Jack" // Add this line
}); And finally, in your const followUpRes = await chain.call({
question: `Was that nice, ${memory.userName}?`, // Use the user's name here
chat_history: chatHistory,
}); Please note that this is a simplified example and you may need to adjust it to fit your specific use case. Also, remember that the I hope this helps! Let me know if you have any other questions. Best, 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.
-
Conversation:
Code using Next.js -- pages/api/usestore2.js :
Beta Was this translation helpful? Give feedback.
All reactions