pub struct RequestBody {Show 21 fields
pub max_tokens: u64,
pub messages: Vec<BetaMessageParam>,
pub model: Model,
pub container: Option<BetaContainerRef>,
pub context_management: Option<BetaContextManagementConfig>,
pub inference_geo: Option<String>,
pub mcp_servers: Option<Vec<BetaRequestMcpServerUrlDefinition>>,
pub metadata: Option<BetaMetadata>,
pub cache_control: Option<BetaCacheControlEphemeral>,
pub output_config: Option<BetaOutputConfig>,
pub service_tier: Option<BetaServiceTierParam>,
pub speed: Option<BetaSpeed>,
pub stop_sequences: Option<Vec<String>>,
pub stream: Option<bool>,
pub system: Option<BetaSystemPrompt>,
pub temperature: Option<f64>,
pub thinking: Option<BetaThinkingConfigParam>,
pub tool_choice: Option<BetaToolChoice>,
pub tools: Option<Vec<BetaToolUnion>>,
pub top_k: Option<u64>,
pub top_p: Option<f64>,
}Fields§
§max_tokens: u64Maximum number of tokens to generate.
messages: Vec<BetaMessageParam>Input messages.
model: ModelTarget model identifier.
container: Option<BetaContainerRef>Optional container id or container parameters.
context_management: Option<BetaContextManagementConfig>Optional context management rules.
inference_geo: Option<String>Optional inference geography hint.
mcp_servers: Option<Vec<BetaRequestMcpServerUrlDefinition>>Optional MCP servers.
metadata: Option<BetaMetadata>Optional per-request metadata.
cache_control: Option<BetaCacheControlEphemeral>Optional top-level cache control for automatic prompt caching.
output_config: Option<BetaOutputConfig>Optional output configuration.
service_tier: Option<BetaServiceTierParam>Optional service tier selection.
speed: Option<BetaSpeed>Optional inference speed mode.
stop_sequences: Option<Vec<String>>Optional custom stop sequences.
stream: Option<bool>Optional streaming toggle.
system: Option<BetaSystemPrompt>Optional system prompt.
temperature: Option<f64>Optional temperature.
thinking: Option<BetaThinkingConfigParam>Optional thinking configuration.
tool_choice: Option<BetaToolChoice>Optional tool choice policy.
tools: Option<Vec<BetaToolUnion>>Optional tool definitions.
top_k: Option<u64>Optional top-k sampling.
top_p: Option<f64>Optional top-p sampling.
Trait Implementations§
Source§impl Clone for RequestBody
impl Clone for RequestBody
Source§fn clone(&self) -> RequestBody
fn clone(&self) -> RequestBody
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RequestBody
impl Debug for RequestBody
Source§impl Default for RequestBody
impl Default for RequestBody
Source§impl<'de> Deserialize<'de> for RequestBody
impl<'de> Deserialize<'de> for RequestBody
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for RequestBody
impl PartialEq for RequestBody
Source§impl Serialize for RequestBody
impl Serialize for RequestBody
impl StructuralPartialEq for RequestBody
Auto Trait Implementations§
impl Freeze for RequestBody
impl RefUnwindSafe for RequestBody
impl Send for RequestBody
impl Sync for RequestBody
impl Unpin for RequestBody
impl UnsafeUnpin for RequestBody
impl UnwindSafe for RequestBody
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more