Skip to main content

objectiveai_sdk/vector/completions/request/
vector_completion_create_params.rs

1//! Vector completion request parameters.
2
3use crate::agent;
4use schemars::JsonSchema;
5use serde::{Deserialize, Serialize};
6
7/// Parameters for creating a vector completion.
8///
9/// Vector completions run multiple agent completions (one per LLM in the
10/// swarm), force each to vote for one of the predefined responses, and
11/// combine votes using the provided profile weights to produce final scores.
12#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
13#[schemars(rename = "vector.completions.request.VectorCompletionCreateParams")]
14pub struct VectorCompletionCreateParams {
15    // --- Core configuration ---
16    /// The conversation messages (the prompt).
17    pub messages: Vec<agent::completions::message::Message>,
18    /// Provider routing preferences.
19    #[serde(skip_serializing_if = "Option::is_none")]
20    #[schemars(extend("omitempty" = true))]
21    pub provider: Option<agent::completions::request::Provider>,
22    /// The Swarm of agents to use.
23    pub swarm: crate::swarm::InlineSwarmBaseOrRemoteCommitOptional,
24    /// Random seed for deterministic results.
25    #[serde(skip_serializing_if = "Option::is_none")]
26    #[schemars(extend("omitempty" = true))]
27    pub seed: Option<i64>,
28    /// Whether to stream the response.
29    #[serde(skip_serializing_if = "Option::is_none")]
30    #[schemars(extend("omitempty" = true))]
31    pub stream: Option<bool>,
32    /// The possible responses the LLMs can vote for.
33    pub responses: Vec<agent::completions::message::RichContent>,
34    /// Continuation from a previous completion, as a base64-encoded string.
35    #[serde(skip_serializing_if = "Option::is_none")]
36    #[schemars(extend("omitempty" = true))]
37    pub continuation: Option<String>,
38}
39