Closed
Description
Description
It could be that I am misunderstanding the documentation, but
in Component 1 I have
const {messages} = useChat({id:'myChatId', initialMessages})
and in component 2 (a child component in this case) I have:
const {messages} = useChat({id:'myChatId'})
messages however is empty and I cannot actually hook into the existing chat session or its data.
Am I misunderstanding this and could I get some guidance please. If I don't have to pass in handleInputChange, input, setInput, messages, setMessages, etc everywhere I want to use it, I'd prefer to do that.
Code example
No response
Additional context
No response