I have another related question that maybe you could help me with? I’ve instructed the agent to output JSON in the following structure so I can store and use various fields to be able to send them to myself in an email:
When you respond, ALWAYS return in this JSON schema:
{
“output”: “<string: the clean text reply you want displayed in the chat window>”,
“name”: “<string, empty if unknown>”,
“email”: “<string, empty if unknown>”,
“topic”: “<string, empty if unknown>”,
“availability”: “<string, empty if unknown>”,
“intent”: “<string: one of ‘collectInfo’, ‘sendTicket’, or ‘none’>”,
}
This is working great within the workflow, but it means that the agent is also storing past messages in the database in a format that doesn’t work well when retrieving past messages for a webpage refresh:
“content”: “{\n \“output\”: \“I understand that you might be testing things out. If you have any questions about Bitcoin or would like assistance with scheduling a consultation, just let me know!\”,\n \“name\”: \”\“,\n \“email\”: \”\“,\n \“topic\”: \”\“,\n \“availability\”: \”\“,\n \“intent\”: \“none\”\n}”,
Do you know of a way that I can:
a) keep data structured like this in the workflow so I can work with the individual fields, but
b) store just the plain text of each message in the database so that when history is retrieved, the messages are formatted in plain text?