-
Couldn't load subscription status.
- Fork 5
Description
Describe the bug
When async apis like POST collections/create and POST threads/start, they return a key in the response which is the resource_uuid. This uuid if used to fetch the info POST collection/info/:collection_id or GET threads/result/:thread_id, throws a 404 resource not found error since the resource has not been created in the db.
To Reproduce
Hit resource creation endpoint and then immediately the api for getting info for that resource. We wont see this in postman, but a quick python script should show this.
Expected behavior
Ideally, we should create the resource in db before returning the key POST collections/create and POST threads/start. The async tasks should do the long running tasks like vector store & assistance creation & then update references accordingly.
Or the service could return a generic id/key that is not tied to the resource and also a separate endpoint to poll on this id/key
Although adding a delay before fetching would solve it temporarily but its not scalable
Screenshots
Additional context
Metadata
Metadata
Assignees
Labels
Type
Projects
Status