GoodMemGoodMem
ReferenceSdkRustTypes

LlmUpdateRequest

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

All types

Struct LlmUpdateRequest

goodmem::models::LlmUpdateRequest

Request body for updating an existing LLM. All fields are optional - only specified fields will be updated. supportedModalities replaces the stored set only when the array contains at least one value; empty or omitted leaves it unchanged and does not count as an update by itself.

pub struct LlmUpdateRequest {
    pub display_name: Option<String>,
    pub description: Option<String>,
    pub endpoint_url: Option<String>,
    pub api_path: Option<String>,
    pub model_identifier: Option<String>,
    pub supported_modalities: Option<Vec<Modality>>,
    pub credentials: Option<Box<EndpointAuthentication>>,
    pub version: Option<String>,
    pub monitoring_endpoint: Option<String>,
    pub capabilities: Option<Box<LlmCapabilities>>,
    pub default_sampling_params: Option<Box<LlmSamplingParams>>,
    pub max_context_length: Option<i32>,
    pub client_config: Option<BTreeMap<String, serde_json::Value>>,
    pub replace_labels: Option<BTreeMap<String, String>>,
    pub merge_labels: Option<BTreeMap<String, String>>,
    pub dashscope_api_dialect: Option<DashScopeApiDialect>,
}

Referenced types: DashScopeApiDialect, EndpointAuthentication, LlmCapabilities, LlmSamplingParams, Modality.

Fields

display_name

pub display_name: Option<String>

Update display name Wire name: displayName.

description

pub description: Option<String>

Update description Wire name: description.

endpoint_url

pub endpoint_url: Option<String>

Update endpoint base URL (OpenAI-compatible base, typically ends with /v1) Wire name: endpointUrl.

api_path

pub api_path: Option<String>

Update API path Wire name: apiPath.

model_identifier

pub model_identifier: Option<String>

Update model identifier (cannot be empty) Wire name: modelIdentifier.

supported_modalities

pub supported_modalities: Option<Vec<Modality>>

Update supported modalities (if array contains >=1 elements, replaces stored set; if empty or omitted, no change and does not count as an update by itself) Wire name: supportedModalities.

credentials

pub credentials: Option<Box<EndpointAuthentication>>

Replace stored credentials. Omit this field to preserve the current credentials; a present empty payload is invalid and never clears them. Wire name: credentials.

version

pub version: Option<String>

Update version information Wire name: version.

monitoring_endpoint

pub monitoring_endpoint: Option<String>

Update monitoring endpoint URL Wire name: monitoringEndpoint.

capabilities

pub capabilities: Option<Box<LlmCapabilities>>

Update LLM capabilities (replaces entire capability set; clients MUST send all flags) Wire name: capabilities.

default_sampling_params

pub default_sampling_params: Option<Box<LlmSamplingParams>>

Update default sampling parameters Wire name: defaultSamplingParams.

max_context_length

pub max_context_length: Option<i32>

Update maximum context window size in tokens Wire name: maxContextLength.

client_config

pub client_config: Option<BTreeMap<String, serde_json::Value>>

Update provider-specific client configuration (replaces entire config; no merging) Wire name: clientConfig.

replace_labels

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

Replace all existing labels with this set. Empty map clears all labels. Cannot be used with mergeLabels. Wire name: replaceLabels.

merge_labels

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

Merge with existing labels: upserts with overwrite. Labels not mentioned are preserved. Cannot be used with replaceLabels. Wire name: mergeLabels.

dashscope_api_dialect

pub dashscope_api_dialect: Option<DashScopeApiDialect>

Update the DashScope request and response API dialect. Valid only for the DASHSCOPE provider. Omit to preserve the stored dialect. Changing apiPath to a recognized canonical DashScope dialect infers its matching dialect; a custom path preserves an existing dialect, while a legacy null dialect is inferred. Wire name: dashscopeApiDialect.

Implementations

validate

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

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

Trait implementations

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

On this page