pub struct LLMRequest {
pub model: String,
pub messages: Vec<ChatMessage>,
pub temperature: Option<f32>,
pub max_tokens: Option<u32>,
pub tools: Option<Vec<ToolDefinition>>,
pub tool_choice: Option<String>,
pub stream: Option<bool>,
pub stop: Option<Vec<String>>,
}Expand description
A request to an LLM.
Fields§
§model: StringThe model to use for the request.
messages: Vec<ChatMessage>The messages to send to the model.
temperature: Option<f32>The temperature to use for the request.
max_tokens: Option<u32>The maximum number of tokens to generate.
tools: Option<Vec<ToolDefinition>>The tools to make available to the model.
tool_choice: Option<String>The tool choice to use for the request.
stream: Option<bool>Whether to stream the response.
stop: Option<Vec<String>>Stop sequences for the request.
Trait Implementations§
Source§impl Clone for LLMRequest
impl Clone for LLMRequest
Source§fn clone(&self) -> LLMRequest
fn clone(&self) -> LLMRequest
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 LLMRequest
impl Debug for LLMRequest
Source§impl<'de> Deserialize<'de> for LLMRequest
impl<'de> Deserialize<'de> for LLMRequest
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 LLMRequest
impl RefUnwindSafe for LLMRequest
impl Send for LLMRequest
impl Sync for LLMRequest
impl Unpin for LLMRequest
impl UnwindSafe for LLMRequest
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