ai
ai copied to clipboard
add props onFinish or onCompletion in experimental_useAssistant
Feature Description
add a new props into UseAssistantOptions
Use Case
After response stream finished, we might need to save the assistant message into db
Additional context
No response
OpenAI automatically stores the assistant messages (the OpenAI assistant API is stateful). You can retrieve them with their API: https://platform.openai.com/docs/api-reference/messages/getMessage
Would that help with your use case?
OpenAI automatically stores the assistant messages (the OpenAI assistant API is stateful). You can retrieve them with their API: https://platform.openai.com/docs/api-reference/messages/getMessage
Would that help with your use case?
Igrammel thanks, but OpenAI only stores messages around 60 days, which doesn't seems to be a best option, so I still want to save them into my own db. https://community.openai.com/t/assistants-api-do-assistant-thread-messages-expire/487558/11