`event.state.session.fullHistory` undefined after ...
# 🤝help
l
Objective: attaching conversation history in the body of a post request to an api call Issue: Script screen is of the script inside the Execute code of the llm block
messages
is undefined in the logs, which is assigned the value of
event.state.session.fullHistory
Solutions attempted: 1. removing trigger and leaving only the conversation start as the only entry point 2. replacing
event.state.session.fullHistory
with
conversation.SummaryAgent.transcript
, which is also undefined 3. Verified
event.state.session.fullHistory
is still working with a another previously published bot.

https://cdn.discordapp.com/attachments/1137105025236221982/1137105025437552720/image.png

https://cdn.discordapp.com/attachments/1137105025236221982/1137105025659842812/image.png

a
where do you have a capture card in this flow?
l
There is no capture card
Is it a fluke that my previous bot worked without a capture card?
a
to be honest i really don't know what the behavior of this bot should be / why it's organized this way. mind sharing what the bot / convo behavior is supposed to be?
by the way i tried {{event.state.session.history}} in a bot and this was defined for me
l
I'll try that, this bot's purpose is essentially to use botpress as a ready made front-end widget for an existing conversaton api using gpt4, the post request endpoint provides the next assistant message
you are right, using
event.state.session.history
does work, albeit using a different data format than
event.state.session.fullHistory
. But I will modify my api endpoint to handle the format of
event.state.session.fullhistory
this solves my problem, thanks
a
awesome. by the way you can access that variable and more by looking at the logs in the debugger window of the studio. can copy the path there directly to by clicking on the clipboard that pops up when you hover

https://cdn.discordapp.com/attachments/1137105025236221982/1137113839427666021/Screenshot_2023-08-04_at_13.00.37.png

l
perfect, thanks for the info
Is there any documentation on those variables?
a
don't believe we have documentation on all the variables that you see in the JSON, but here are some docs that cover variables more broadly: https://botpress.com/docs/cloud/studio/variables/
l
Ok I'll figure it out then, because it's not clear how each entry in the history can vary, such as what each key means, and what are the different possible values for the keys, and which keys can appear
a
yes, there's work to be done to improve that part of the documentation
35 Views