How to setThread, setMessage with useAssistant hook #1563
Replies: 1 comment
-
setMessages is now exposed from march 18 - just needed to update ... |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Use case - start a new thread with a dynamical injected message.
My users can select various options from the client. These selections are used to query a db to get back bunch of text that represent the initial message text that I want to start an assistant thread with (its maybe up to 1000 words) - sort of mini RAG on the fly. The user could then change their selections. When they change I want to basically restart the conversation. I'm using the useAssistant hook but it doesn't expose the setThread or setMessages callbacks or provide any handlers that could be used to either reset the threadId to null or to insert an initial message without using a form input. Any help on how to work around this greatly appreciated...
Beta Was this translation helpful? Give feedback.
All reactions