LlmResponse
Rust struct goodmem::models::LlmResponse: declaration, fields or variants, and implementations.
Struct LlmResponse
goodmem::models::LlmResponse
LLM configuration information
pub struct LlmResponse {
pub llm_id: String,
pub display_name: String,
pub description: Option<String>,
pub provider_type: LlmProviderType,
pub endpoint_url: String,
pub api_path: Option<String>,
pub model_identifier: String,
pub supported_modalities: Vec<Modality>,
pub credentials: Option<Box<EndpointAuthentication>>,
pub labels: BTreeMap<String, String>,
pub version: Option<String>,
pub monitoring_endpoint: Option<String>,
pub capabilities: 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 owner_id: String,
pub created_at: i64,
pub updated_at: i64,
pub created_by_id: String,
pub updated_by_id: String,
pub dashscope_api_dialect: Option<DashScopeApiDialect>,
}Referenced types: DashScopeApiDialect, EndpointAuthentication, LlmCapabilities, LlmProviderType, LlmSamplingParams, Modality.
Fields
llm_id
pub llm_id: String
Unique identifier of the LLM
Wire name: llmId.
display_name
pub display_name: String
User-facing name of the LLM
Wire name: displayName.
description
pub description: Option<String>
Description of the LLM
Wire name: description.
provider_type
pub provider_type: LlmProviderType
Type of LLM provider
Wire name: providerType.
endpoint_url
pub endpoint_url: String
API endpoint base URL
Wire name: endpointUrl.
api_path
pub api_path: Option<String>
API path for chat/completions request
Wire name: apiPath.
model_identifier
pub model_identifier: String
Model identifier
Wire name: modelIdentifier.
supported_modalities
pub supported_modalities: Vec<Modality>
Supported content modalities
Wire name: supportedModalities.
credentials
pub credentials: Option<Box<EndpointAuthentication>>
Stored credentials; present only when GetLLM explicitly requests them and the caller has READ_LLM_CREDENTIALS. Always omitted from create, update, and list responses.
Wire name: credentials.
labels
pub labels: 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.
capabilities
pub capabilities: Box<LlmCapabilities>
LLM capabilities defining supported features and modes
Wire name: capabilities.
default_sampling_params
pub default_sampling_params: Option<Box<LlmSamplingParams>>
Default sampling parameters for generation requests
Wire name: defaultSamplingParams.
max_context_length
pub max_context_length: Option<i32>
Maximum context window size in tokens
Wire name: maxContextLength.
client_config
pub client_config: Option<BTreeMap<String, serde_json::Value>>
Provider-specific client configuration
Wire name: clientConfig.
owner_id
pub owner_id: String
Owner ID of the LLM
Wire name: ownerId.
created_at
pub created_at: i64
Creation timestamp (milliseconds since epoch)
Wire name: createdAt.
updated_at
pub updated_at: i64
Last update timestamp (milliseconds since epoch)
Wire name: updatedAt.
created_by_id
pub created_by_id: String
ID of the user who created the LLM
Wire name: createdById.
updated_by_id
pub updated_by_id: String
ID of the user who last updated the LLM
Wire name: updatedById.
dashscope_api_dialect
pub dashscope_api_dialect: Option<DashScopeApiDialect>
Configured DashScope request and response API dialect; present only for DashScope configurations with a persisted dialect.
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 LlmResponseimpl std::fmt::Debug for LlmResponse