Closed CakeCrusher closed 8 months ago
list return a Vec of
pub struct RunStepObject {
/// The identifier, which can be referenced in API endpoints.
pub id: String,
/// The object type, which is always `thread.run.step`.
pub object: String,
/// The Unix timestamp (in seconds) for when the run step was created.
pub created_at: i32,
/// The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) associated with the run step.
pub assistant_id: Option<String>,
/// The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) that was run.
pub thread_id: String,
/// The ID of the [run](https://platform.openai.com/docs/api-reference/runs) that this run step is a part of.
pub run_id: String,
/// The type of run step, which can be either `message_creation` or `tool_calls`.
pub r#type: RunStepType,
/// The status of the run step, which can be either `in_progress`, `cancelled`, `failed`, `completed`, or `expired`.
pub status: RunStatus,
/// The details of the run step.
pub step_details: StepDetails,
/// The last error associated with this run. Will be `null` if there are no errors.
pub last_error: Option<LastError>,
///The Unix timestamp (in seconds) for when the run step expired. A step is considered expired if the parent run is expired.
pub expired_at: Option<i32>,
/// The Unix timestamp (in seconds) for when the run step was cancelled.
pub cancelled_at: Option<i32>,
/// The Unix timestamp (in seconds) for when the run step failed.
pub failed_at: Option<i32>,
/// The Unix timestamp (in seconds) for when the run step completed.
pub completed_at: Option<i32>,
pub metadata: Option<HashMap<String, serde_json::Value>>,
}
need to check if it match the client expectation
Bump. I also have this error with chainlit.
@CakeCrusher @ClancyDennis
indeed the api response type was wrong, fixed it, let me know if you have any other issues!
@louis030195 First I initialize the assistant with:
Which prints logs:
[2024-01-24T15:47:44Z INFO assistants_core::messages] Adding message to thread_id: 9d4938dc-d357-4c6f-b92d-b89f169ae759, role: Assistant, user_id: 00000000-0000-0000-0000-000000000000 [2024-01-24T15:47:44Z INFO assistants_core::run_steps] Creating step for run_id: c2951de7-eded-4d1c-9bcf-2726f5f99b3b [2024-01-24T15:47:44Z INFO assistants_core::runs] Updating run for run_id: c2951de7-eded-4d1c-9bcf-2726f5f99b3b [2024-01-24T15:47:44Z INFO assistants_core::executor] Execution done: Run { inner: RunObject { id: "c2951de7-eded-4d1c-9bcf-2726f5f99b3b", object: "", created_at: 1706111256, thread_id: "9d4938dc-d357-4c6f-b92d-b89f169ae759", assistant_id: Some("2005597a-2b5e-4a37-8cce-71bccd5cfbd0"), status: Completed, required_action: None, last_error: None, expires_at: None, started_at: None, cancelled_at: None, failed_at: None, completed_at: None, model: "", instructions: "", tools: [], file_ids: [], metadata: Some({}) }, user_id: "00000000-0000-0000-0000-000000000000" } [2024-01-24T15:47:44Z INFO assistants_core::executor] Consuming queue
with logs:
I get this error: