Struct llm_api_adapter::models::RequestBody
source · pub struct RequestBody {
pub model: String,
pub messages: Vec<Message>,
pub max_tokens: u32,
pub temperature: f32,
}
Expand description
Represents the request body sent to the Anthropic API.
The RequestBody
struct contains the model name, the list of messages,
the maximum number of tokens to generate, and the temperature value.
Fields§
§model: String
The name of the model to use for generating the response.
messages: Vec<Message>
The list of messages in the conversation.
max_tokens: u32
The maximum number of tokens to generate in the response.
temperature: f32
The temperature value to control the randomness of the generated response.
Trait Implementations§
source§impl Debug for RequestBody
impl Debug 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
Auto Trait Implementations§
impl Freeze for RequestBody
impl RefUnwindSafe for RequestBody
impl Send for RequestBody
impl Sync for RequestBody
impl Unpin 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