Open Jamesllllllllll opened 9 months ago
Yeah I saw this after implementing the routes. Looking at the response though, I think the frontend still has to poll for the run status. So although this removes the need for an API route, does it do anything else?
{
"id": "run_abc123",
"object": "thread.run",
"created_at": 1699076792,
"assistant_id": "asst_abc123",
"thread_id": "thread_abc123",
"status": "queued",
"started_at": null,
"expires_at": 1699077392,
"cancelled_at": null,
"failed_at": null,
"completed_at": null,
"last_error": null,
"model": "gpt-4",
"instructions": "You are a helpful assistant.",
"tools": [],
"file_ids": [],
"metadata": {}
}
I do like the idea of having the AI start the conversation once everything is ready (assistant crated, documents added, thread started). It's nice for UX to show that the user can start chatting.
Ah I see what you're saying. By using this route the AI can start the convo.
That's a nice-to-have. I think we can add that later if we finish early.
Sounds good!
Hey, getting ready to work on setting up polling for runs and I came across this method - createThreadAndRun
It creates a thread and runs it in one request. Would this be easy to implement? I like it because the AI response would appear, showing the user another visual cue that they can start chatting.