@tanstack/ai-react version
v.0.18.1
Framework/Library version
React v18
Describe the bug and the steps to reproduce it
import { fetchServerSentEvents, useChat } from '@tanstack/ai-react';
function Chat() {
const { messages, sendMessage, isLoading, error } = useChat({
threadId: '1',
connection: fetchServerSentEvents('http://localhost:8080/api/v1/chats'),
persistence: true,
});
}
I want my chat to be persistent and keep chat messages on the server side.
So, I am setting persistence: true according the docs.
However TypeScript says:
Type 'boolean' is not assignable to type 'ChatClientPersistence<any>'
And there is no GET request when my component mounts to fetch initial messages.
Dependencies:
"@tanstack/ai": "^0.42.0",
"@tanstack/ai-react": "^0.18.1",
"react": "^18.1.0",
"react-dom": "^18.1.0"
What I am doing wrong?
Screenshots or Videos (Optional)
Do you intend to try to help solve this bug with your own PR?
No response
Terms & Code of Conduct
@tanstack/ai-react version
v.0.18.1
Framework/Library version
React v18
Describe the bug and the steps to reproduce it
I want my chat to be persistent and keep chat messages on the server side.
So, I am setting
persistence: trueaccording the docs.However TypeScript says:
And there is no GET request when my component mounts to fetch initial messages.
Dependencies:
What I am doing wrong?
Screenshots or Videos (Optional)
Do you intend to try to help solve this bug with your own PR?
No response
Terms & Code of Conduct