Skip to main content

sim_lib_openai_server/storage/
mod.rs

1//! Storage backends for the OpenAI-compatible gateway.
2//!
3//! The gateway persists request/run/event/response records plus the durable
4//! account state (files, batches, threads, vector stores) behind a set of
5//! object-store traits. Concrete backends are provided for in-memory maps
6//! ([`MemoryGatewayStore`]) and SIM tables ([`TableGatewayStore`]); both are
7//! content-addressed for the eval-pipeline records.
8
9/// In-memory gateway store backed by [`std::collections::BTreeMap`]s.
10pub mod memory;
11/// Gateway record kinds (files, batches, threads, messages) and their
12/// content-addressed object-store traits.
13pub mod objects;
14/// SIM-table-backed gateway store.
15pub mod table;
16/// The core [`GatewayStore`] trait over content-addressed eval records.
17pub mod r#trait;
18/// Vector-store record kinds for the gateway.
19pub mod vector;
20
21pub use memory::{GatewayStoreCounts, MemoryGatewayStore};
22pub use objects::{
23    GATEWAY_BATCH_KIND, GATEWAY_FILE_KIND, GATEWAY_THREAD_KIND, GATEWAY_THREAD_MESSAGE_KIND,
24    GatewayBatch, GatewayBatchCounts, GatewayBatchStatus, GatewayFile, GatewayFileStorageRef,
25    GatewayResponseObjectStore, GatewayStateStore, GatewayThread, GatewayThreadMessage,
26    StoredGatewayResponse,
27};
28pub use table::TableGatewayStore;
29pub use r#trait::GatewayStore;
30pub use vector::{
31    GATEWAY_VECTOR_STORE_ITEM_KIND, GATEWAY_VECTOR_STORE_KIND, GatewayVectorStore,
32    GatewayVectorStoreItem,
33};