GoodMemGoodMem
ReferenceSdkRustTypes

EmbedderQueryFormat

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

All types

Struct EmbedderQueryFormat

goodmem::models::EmbedderQueryFormat

Overrides one embedder's stored query format for this request only. The embedder's stored inputFormat is not changed. Each supplied field replaces the matching stored field; an omitted field keeps the stored value. A supplied field is used as given, and an empty string means none for this request. At least one of instruction and queryTemplate is required. The embedder must be an embedder of a requested space, and its provider must accept an input format.

pub struct EmbedderQueryFormat {
    pub embedder_id: String,
    pub instruction: Option<String>,
    pub query_template: Option<String>,
}

Fields

embedder_id

pub embedder_id: String

The UUID of the embedder this entry applies to. Wire name: embedderId.

instruction

pub instruction: Option<String>

Task instruction for this embedder. It takes precedence over the request-wide query instruction and over the embedder's stored instruction. The query template in effect must read {{ instruction }}. An empty or blank string removes the instruction for this request; the query template in effect must then work without one. Wire name: instruction.

query_template

pub query_template: Option<String>

Query template for this embedder, with the rules of ModelInputFormat.queryTemplate. It replaces the stored query template for this request. An empty string sends the query unchanged. Wire name: queryTemplate.

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 EmbedderQueryFormat
  • impl std::fmt::Debug for EmbedderQueryFormat

On this page