GoodMemGoodMem
ReferenceSdkRustTypes

EmbedderCreationRequest

Rust struct goodmem::models::EmbedderCreationRequest: declaration, fields or variants, and implementations.

All types

Struct EmbedderCreationRequest

goodmem::models::EmbedderCreationRequest

Request body for creating a new Embedder. An Embedder represents a configuration for vectorizing content.

pub struct EmbedderCreationRequest {
    pub display_name: String,
    pub description: Option<String>,
    pub provider_type: ProviderType,
    pub endpoint_url: String,
    pub api_path: Option<String>,
    pub model_identifier: String,
    pub dimensionality: i32,
    pub distribution_type: DistributionType,
    pub max_sequence_length: Option<i32>,
    pub supported_modalities: Option<Vec<Modality>>,
    pub credentials: Option<Box<EndpointAuthentication>>,
    pub labels: Option<BTreeMap<String, String>>,
    pub version: Option<String>,
    pub monitoring_endpoint: Option<String>,
    pub owner_id: Option<String>,
    pub embedder_id: Option<String>,
    pub dashscope_api_dialect: Option<DashScopeApiDialect>,
    pub gemini_endpoint_config: Option<Box<GeminiEndpointConfig>>,
}

Referenced types: DashScopeApiDialect, DistributionType, EndpointAuthentication, GeminiEndpointConfig, Modality, ProviderType.

Fields

display_name

pub display_name: String

User-facing name of the embedder Wire name: displayName.

description

pub description: Option<String>

Description of the embedder Wire name: description.

provider_type

pub provider_type: ProviderType

Type of embedding provider Wire name: providerType.

endpoint_url

pub endpoint_url: String

Base HTTP(S) endpoint for provider requests. Gemini endpoint URLs must not contain query parameters. Wire name: endpointUrl.

api_path

pub api_path: Option<String>

Provider-relative request path. Omit or send blank to use the provider default. For Gemini, this is an API version: /v1beta for Developer and /v1 for Google Cloud. Wire name: apiPath.

model_identifier

pub model_identifier: String

Model identifier Wire name: modelIdentifier.

dimensionality

pub dimensionality: i32

Output vector dimensions Wire name: dimensionality.

distribution_type

pub distribution_type: DistributionType

Type of embedding distribution (DENSE or SPARSE) Wire name: distributionType.

max_sequence_length

pub max_sequence_length: Option<i32>

Maximum input sequence length Wire name: maxSequenceLength.

supported_modalities

pub supported_modalities: Option<Vec<Modality>>

Supported content modalities (defaults to TEXT if not provided) Wire name: supportedModalities.

credentials

pub credentials: Option<Box<EndpointAuthentication>>

Structured credential payload describing how to authenticate with the provider. Required for SaaS providers; optional for local or proxy providers. Wire name: credentials.

labels

pub labels: Option<BTreeMap<String, String>>

User-defined labels for categorization Wire name: labels.

version

pub version: Option<String>

Version information Wire name: version.

monitoring_endpoint

pub monitoring_endpoint: Option<String>

Monitoring endpoint URL Wire name: monitoringEndpoint.

owner_id

pub owner_id: Option<String>

Optional owner principal UUID. If omitted, defaults to the authenticated principal. CREATE_EMBEDDER is evaluated against the proposed embedder and owner. Wire name: ownerId.

embedder_id

pub embedder_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: embedderId.

dashscope_api_dialect

pub dashscope_api_dialect: Option<DashScopeApiDialect>

DashScope request and response API dialect. Valid only for the DASHSCOPE provider. Omit to infer the dialect from apiPath, the model catalog, or the native text default. Wire name: dashscopeApiDialect.

gemini_endpoint_config

pub gemini_endpoint_config: Option<Box<GeminiEndpointConfig>>

Gemini backend routing. Valid only for the GEMINI provider. Omit to use the Developer API; when present, backend is required and the gRPC service validates the backend-specific projectId and location contract. Wire name: geminiEndpointConfig.

Implementations

validate

pub fn validate(&self) -> crate::Result<()>

Validate the request before sending, without making an HTTP call.

from_model

pub fn from_model(model: &str, api_key: Option<&str>) -> Result<Self>

Fill provider, endpoint, dimensions, and credentials from the bundled registry.

Trait implementations

  • Clone (derived)
  • Default (derived)
  • PartialEq (derived)
  • Serialize (derived)
  • impl<'de> Deserialize<'de> for EmbedderCreationRequest
  • impl std::fmt::Debug for EmbedderCreationRequest

On this page