openai-interface 0.10.0

A low-level Rust interface for the OpenAI API
Documentation
//! The Containers API: manage container objects via `/containers`.
//!
//! > ![warn] This module is untested!
//! > If you encounter any issues, please report them on the repository.
//!
//! Containers provide a persistent filesystem for the Code Interpreter
//! tool of the Responses API. See
//! [the OpenAI Reusing your own knowledge and tools guide](https://platform.openai.com/docs/guides/reusing-your-own-knowledge-and-tools).
//!
//! Submodules: [`create`], [`retrieve`], [`delete`], [`list`] and
//! [`files`] (per-container file management).

pub mod create;
pub mod delete;
pub mod files;
pub mod list;
pub mod retrieve;

/// A container object.
#[derive(Debug, Clone, serde::Deserialize)]
pub struct Container {
    /// The container ID, e.g. `cntr_...`.
    pub id: String,
    /// The object type, always `container`.
    #[serde(default)]
    pub object: Option<String>,
    /// Unix timestamp (seconds) of when the container was created.
    #[serde(default)]
    pub created_at: Option<u64>,
    /// The container status (`running`, `paused`, `exited`).
    #[serde(default)]
    pub status: Option<String>,
    /// Unix timestamp (seconds) of when the container expires.
    #[serde(default)]
    pub expires_at: Option<u64>,
    /// The name of the container.
    #[serde(default)]
    pub name: Option<String>,
}

crate::impl_from_str!(Container);