SpaceCreationRequest
Rust struct goodmem::models::SpaceCreationRequest: declaration, fields or variants, and implementations.
Struct SpaceCreationRequest
goodmem::models::SpaceCreationRequest
Request body for creating a new Space. A Space is a container for organizing related memories with vector embeddings.
pub struct SpaceCreationRequest {
pub name: String,
pub labels: Option<BTreeMap<String, String>>,
pub space_embedders: Vec<SpaceEmbedderConfig>,
pub owner_id: Option<String>,
pub default_chunking_config: Box<ChunkingConfiguration>,
pub space_id: Option<String>,
}Referenced types: ChunkingConfiguration, SpaceEmbedderConfig.
Fields
name
pub name: String
The desired name for the space. Must be unique within the user's scope.
Wire name: name.
labels
pub labels: Option<BTreeMap<String, String>>
A set of key-value pairs to categorize or tag the space. Used for filtering and organizational purposes.
Wire name: labels.
space_embedders
pub space_embedders: Vec<SpaceEmbedderConfig>
List of embedder configurations to associate with this space. At least one embedder configuration is required. Each specifies an embedder ID and a relative default retrieval weight used when no per-request overrides are provided.
Wire name: spaceEmbedders.
owner_id
pub owner_id: Option<String>
Optional owner principal UUID. If omitted, defaults to the authenticated principal. CREATE_SPACE is evaluated against the proposed space and owner.
Wire name: ownerId.
default_chunking_config
pub default_chunking_config: Box<ChunkingConfiguration>
Default chunking strategy for memories in this space
Wire name: defaultChunkingConfig.
space_id
pub space_id: Option<String>
Optional client-provided UUID for idempotent creation. If not provided, server generates a new UUID. Returns ALREADY_EXISTS if ID is already in use.
Wire name: spaceId.
Implementations
validate
pub fn validate(&self) -> crate::Result<()>
Validate the request before sending, without making an HTTP call.
new
pub fn new(name: impl Into<String>, embedders: Vec<SpaceEmbedderConfig>) ->Result<Self>
Use the shared default chunking policy and explicit embedder weights.
Trait implementations
Clone(derived)Default(derived)PartialEq(derived)Serialize(derived)impl<'de> Deserialize<'de> for SpaceCreationRequestimpl std::fmt::Debug for SpaceCreationRequest