openai-interface 0.13.0

A low-level Rust interface for the OpenAI API
Documentation
//! Manage the files of a container via `/containers/{container_id}/files`.
//!
//! > ![warn] This module is untested!
//! > If you encounter any issues, please report them on the repository.
//!
//! Submodules: [`create`], [`retrieve`], [`delete`], [`list`] and
//! [`content`].

pub mod content;
pub mod create;
pub mod delete;
pub mod list;
pub mod retrieve;

/// A file attached to a container.
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct ContainerFile {
    /// The file ID, e.g. `cfile_...`.
    pub id: String,
    /// The object type, always `container.file`.
    #[serde(default)]
    pub object: Option<String>,
    /// Unix timestamp (seconds) of when the file was created.
    #[serde(default)]
    pub created_at: Option<u64>,
    /// The size of the file in bytes.
    #[serde(default)]
    pub size: Option<u64>,
    /// The path of the file inside the container.
    #[serde(default)]
    pub path: Option<String>,
    /// The source of the file (`container` or `user`).
    #[serde(default)]
    pub source: Option<String>,
}

crate::impl_from_str!(ContainerFile);