#[non_exhaustive]pub struct CreateMessageRequestBody {Show 27 fields
pub model: ClaudeModel,
pub messages: Vec<MessageParam>,
pub max_tokens: u64,
pub cache_control: Option<CacheControl>,
pub container: Option<ContainerParam>,
pub context_management: Option<ContextManagementConfig>,
pub diagnostics: Option<DiagnosticsParam>,
pub fallback_credit_token: Option<FallbackCreditTokenParam>,
pub fallbacks: Option<FallbacksParam>,
pub inference_geo: Option<InferenceGeo>,
pub mcp_servers: Option<Vec<McpServer>>,
pub metadata: Option<Metadata>,
pub output_config: Option<OutputConfig>,
pub output_format: Option<JsonSchemaFormat>,
pub service_tier: Option<RequestServiceTier>,
pub speed: Option<Speed>,
pub stop_sequences: Option<Vec<String>>,
pub stream: Option<bool>,
pub system: Option<SystemPrompt>,
pub temperature: Option<f64>,
pub thinking: Option<ThinkingConfig>,
pub tool_choice: Option<ToolChoice>,
pub tools: Option<Vec<Tool>>,
pub top_k: Option<i64>,
pub top_p: Option<f64>,
pub user_profile_id: Option<String>,
pub extra: JsonObject,
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.model: ClaudeModel§messages: Vec<MessageParam>§max_tokens: u64§cache_control: Option<CacheControl>§container: Option<ContainerParam>§context_management: Option<ContextManagementConfig>§diagnostics: Option<DiagnosticsParam>§fallback_credit_token: Option<FallbackCreditTokenParam>Redeem a prior refusal’s fallback credit on retry.
fallbacks: Option<FallbacksParam>Server-side retry routing used when the requested model refuses.
inference_geo: Option<InferenceGeo>§mcp_servers: Option<Vec<McpServer>>§metadata: Option<Metadata>§output_config: Option<OutputConfig>§output_format: Option<JsonSchemaFormat>👎Deprecated:
use output_config.format instead
Deprecated. Use output_config.format instead.
service_tier: Option<RequestServiceTier>§speed: Option<Speed>§stop_sequences: Option<Vec<String>>§stream: Option<bool>§system: Option<SystemPrompt>§temperature: Option<f64>§thinking: Option<ThinkingConfig>§tool_choice: Option<ToolChoice>§tools: Option<Vec<Tool>>§top_k: Option<i64>§top_p: Option<f64>§user_profile_id: Option<String>§extra: JsonObjectImplementations§
Trait Implementations§
Source§impl Clone for CreateMessageRequestBody
impl Clone for CreateMessageRequestBody
Source§fn clone(&self) -> CreateMessageRequestBody
fn clone(&self) -> CreateMessageRequestBody
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CreateMessageRequestBody
impl Debug for CreateMessageRequestBody
Source§impl<'de> Deserialize<'de> for CreateMessageRequestBody
impl<'de> Deserialize<'de> for CreateMessageRequestBody
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 CreateMessageRequestBody
impl PartialEq for CreateMessageRequestBody
Source§impl Serialize for CreateMessageRequestBody
impl Serialize for CreateMessageRequestBody
impl StructuralPartialEq for CreateMessageRequestBody
Auto Trait Implementations§
impl Freeze for CreateMessageRequestBody
impl RefUnwindSafe for CreateMessageRequestBody
impl Send for CreateMessageRequestBody
impl Sync for CreateMessageRequestBody
impl Unpin for CreateMessageRequestBody
impl UnsafeUnpin for CreateMessageRequestBody
impl UnwindSafe for CreateMessageRequestBody
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