For this assignment Wallis and I wanted to see if we could develop an interesting interaction via Discord bots. For our class with Daniel Shiffman, Programming A to Z, we’re working on how to program Discord bots to interact and we thought this would be an interesting opportunity to try and program a conversation between two LLM based bots.
We decided to use the meta/meta-llama-3-70b-instruct LLM on Replicate because their documentation makes it fairly easy to implement via their API.
The first hurdle was to set up the programming environment, and to write the appropriate script to make sure that the two Bots were calling the API every time they responded to our slash command. We decided to use the command “/tell me a story about: “prompt”, where the user could enter any topic as a prompt to begin the conversation.
At this point in the process both bots had similar input prompt to the API which were almost identical to the documentation’s suggestions.
Our next goal was to have our bots, April and June, respond only to each other beginning with the prompt. We did this by identifying the userID and channelID for our respective bots, and adding this to our program. Luckily we had success! The bots began chatting to each other right away with great enthusiasm. However we realized that they weren’t able to reference previous message data and were struggling to keep track of the conversation, so they kept looping over the same discussion continuously in the chat.
We adjusted our code so the bots were able to reference each other and carry on a conversation where they could build on top of their previous messages.
Wallis and I then each prompted a break-up message to each of our bots because we wanted to see how they might respond differently. We tried this a few different times with different phrasing and this was the final break-up dialog with my bot, June.