adrienne pfp
adrienne
@adrienne
One of the challenges I've had building the GM Farcaster AI bot is getting it to have a back-and-forth conversation on Farcaster with a user in a natural way, just like you and I would :) The API is serverless and stateless, so every time the bot is tagged, it has no awareness or memory of being tagged before. My first attempt to give the bot awareness of ongoing conversations was by building a recursive function that recreated the chat history between the bot and the user. I then passed this history into the prompt as "conversation history." I later switched to using the new Neynar API, which provides a conversation summary. This change simplified my code and broadened the bot’s awareness to include comments from other users in the thread, not just the direct back-and-forth. It's working OK, but it's not great. Yesterday, I learned there might be a better approach by using the "messages" array in the GPT API instead of the "jam everything into a massive prompt" method.
1 reply
0 recast
4 reactions

UpstHoopWubba pfp
UpstHoopWubba
@upsthoopwubba
Leveraging message history for engaging AI conversations
0 reply
0 recast
0 reaction