pub struct MessageBody {
pub model: String,
pub messages: Vec<Message>,
pub max_tokens: u32,
pub metadata: Option<HashMap<String, String>>,
pub stop_sequences: Option<Vec<String>>,
pub stream: Option<bool>,
pub system: Option<String>,
pub temperature: Option<f32>,
pub top_k: Option<u32>,
pub top_p: Option<f32>,
}
Fields§
§model: String
The model that will complete your prompt. See this link for additional details and options: https://docs.anthropic.com/claude/docs/models-overview
messages: Vec<Message>
Input messages.
max_tokens: u32
The maximum number of tokens to generate before stopping.
metadata: Option<HashMap<String, String>>
An object describing metadata about the request.
stop_sequences: Option<Vec<String>>
Custom text sequences that will cause the model to stop generating.
stream: Option<bool>
Whether to incrementally stream the response using server-sent events.
system: Option<String>
System prompt
temperature: Option<f32>
Amount of randomness injected into the response.
top_k: Option<u32>
Only sample from the top K options for each subsequent token.
top_p: Option<f32>
Use nucleus sampling.
Implementations§
Trait Implementations§
Source§impl Debug for MessageBody
impl Debug for MessageBody
Source§impl Default for MessageBody
impl Default for MessageBody
Source§fn default() -> MessageBody
fn default() -> MessageBody
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for MessageBody
impl<'de> Deserialize<'de> for MessageBody
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
Auto Trait Implementations§
impl Freeze for MessageBody
impl RefUnwindSafe for MessageBody
impl Send for MessageBody
impl Sync for MessageBody
impl Unpin for MessageBody
impl UnwindSafe for MessageBody
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