Turns out this line was causing the problem. Can s...
# 🌎general
q
Turns out this line was causing the problem. Can someone explain what it is supposed to do?
e
Hey @quaint-cat-69193, the fullHistory variable is one users create to build a full transcript of the conversation
But in your case, I think you are better off using the transcript variable from the Summary Agent.
To use it, go to the Agents tab (robot head) and enable the Summary
Now go to your AI Task and replace the current input with:
Conversation transcript: {{conversation.SummaryAgent.transcript}}
q
Ok thanks a lot. \
What's the difference between the two? Where can I find more info about the fullHistory one?
e
The transcript one is auto generated by the Summary Agent. The agent needs to be enabled and it can only save up to a certain amount of messages,
This summary agent also makes available a summary variable, that is a high-level overview of the conversation.
Now the fullHistory variable, is a custom variable you can create to store the complete history of the conversation, but it takes some advanced steps to set it up
You will need to add a ,Before incoming hook (with any name) with the code:
Copy code
js
  if (!event.state.session.fullHistory) {
    event.state.session.fullHistory = ''
  }
  event.state.session.fullHistory = event.state.session.fullHistory + `user :  ${event.payload.text}` + '\n'
And also a before outgoing hook :
Copy code
js
  if (!event.state.session.fullHistory) {
    event.state.session.fullHistory = ''
  }
  event.state.session.fullHistory = event.state.session.fullHistory + `bot : ${outgoingEvent.payload.text}` + '\n'
Then you can access the full history at any time with the variable {{event.state.session.fullHistory}}
@high-house-27719, this is how you use the fullHistory variable
h
thank you man
e
Anytime, good building! 🚀