ai icon indicating copy to clipboard operation
ai copied to clipboard

add props onFinish or onCompletion in experimental_useAssistant

Open illusion77 opened this issue 3 months ago • 2 comments

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

illusion77 avatar Apr 08 '24 03:04 illusion77

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?

lgrammel avatar Apr 08 '24 12:04 lgrammel

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

illusion77 avatar Apr 27 '24 20:04 illusion77