openai-interface 0.14.0

A low-level Rust interface for the OpenAI API
Documentation
//! Batch-manage vector store files via
//! `/vector_stores/{vector_store_id}/file_batches`.
//!
//! > ![warn] This module is untested!
//! > If you encounter any issues, please report them on the repository.
//!
//! A file batch adds up to 500 files to a vector store in one
//! operation. Submodules: [`create`], [`retrieve`], [`cancel`],
//! [`complete`] and [`list`] (the files of a batch).

pub mod cancel;
pub mod complete;
pub mod create;
pub mod list;
pub mod retrieve;

/// A vector store file batch.
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct VectorStoreFileBatch {
    /// The batch ID, e.g. `vsfb_...`.
    pub id: String,
    /// The object type, always `vector_store.file_batch`.
    #[serde(default)]
    pub object: Option<String>,
    /// Unix timestamp (seconds) of when the batch was created.
    #[serde(default)]
    pub created_at: Option<u64>,
    /// The ID of the vector store the batch belongs to.
    #[serde(default)]
    pub vector_store_id: Option<String>,
    /// The current status (`in_progress`, `completed`, `cancelled`,
    /// `failed`).
    #[serde(default)]
    pub status: Option<String>,
    /// The file counts of the batch.
    #[serde(default)]
    pub file_counts: Option<crate::vector_stores::VectorStoreFileCounts>,
}

crate::impl_from_str!(VectorStoreFileBatch);