HocusPocus - Hi guys, from the ai assistent tem...
Hi guys, from the ai assistent template I want to modify the response time as now the message and response are almost simultaneously. I was thinking of adding a delay on conditional visibility in FF. I saw that there is a random data option so it might be possible to randomize the response time for the assistent. I appreciate every help.
4 Replies
same with me also
ive also noticed the streaming roughly works
@Stu
Hey @HocusPocus & @Matthew if I'm understanding your question correctly, you're talking about how the "bouncing 3 dots" response from the AI Assistant shows up in the chat history so close to the time the user's message shows on the chat history? That's because we do everything we can using Flutterflow's API functionality before we have to hand off the "streaming" response for Firebase to facilitate. So after you press the send button, what you're actually seeing when the send button turns to a loading animation is the API call to BuildShip to initiate your workflow up until we get a "threadId" back from OpenAI/BuildShip to say that Chat GPT has the request and is working on it. That's when you see the user's message and the "bouncing 3 dots" on the chat history, because it's at that point that Flutterflow starts listening to Firebase for a streamed response that BuildShip is feeding it as soon as it comes back from OpenAI.
tl;dr...
You could implement a delayed onLoad animation to give the impression that there has been some time between the user sending the message and the Assistant starting to type a response, but it would really just be to make the UI feel a bit more natural. Does that make sense?
Yes @Stu very clear. I have One additional question. I'm using the same template in buildship. I was wondering if it is possible to send images alongside normal messages. I have an API in buildship that return an image path. However I need to implement it in the chat in firebare. So the UI in FF has a button that triggers an api that return an image path. So my question is how do I put it into firebare alongsifr the pre existing chat functuonality?
fixed it 😀 I did some small coding by saving the image response in a new field in Firestore.