Is it possible to create a workflow that incorporates chatbots to:
- Query a database to respond to chat inquiries.
- Request the chat user's first name, email, and other details.
- Proceed to the next step once the chat includes the user's information?
Could you please provide guidance on how to achieve this?
Yes, this is achievable.
You can utilize the Chat trigger Node and link it to a database where you store the requested values such as Name and Email, associated with the chatsessionid. This allows you to route the conversation appropriately. If the fields are empty, prompt the user to provide them; if they are populated, direct the conversation to the AI Agent. The Agent can be integrated with tools and Vector databases.
For your knowledge base, store it within a vector database. To check information like order status, you can connect a tool that queries a database.
If you can share more specifics about your exact requirements, I can offer a workflow example or assist you in constructing one.
I'm encountering an issue with the second AI agent, specifically an 'Error in sub-node ‘Window Buffer Memory1’. I'm unsure how to share the window memory.
This is how I would ensure that you receive the correct data from the user. Alternatively, you could modify the chat widget to require users to complete a form before initiating a chat.
And one more thing regarding your issue with chat storage/context:
When using {{ $json.sessionId }}, you are referencing the output from your previous node.
In your situation, the initial Agent is producing output similar to this:
json
{
"output": "AI reply"
}
This is why your second AI Agent node cannot reference {{ $json.sessionId }}.
Instead, please refer to {{ $(‘When chat message received’).item.json.sessionId }} in the storage node.
This discussion was automatically closed 90 days following the last response. New replies are no longer permitted.