pub struct ModelRequest {
pub messages: Vec<Message>,
pub tools: Vec<ToolDefinition>,
pub tool_choice: Option<ToolChoice>,
pub system_prompt: Option<String>,
}Expand description
A model invocation request visible to middleware.
Contains all parameters that will be sent to the ChatModel, plus
the optional system prompt managed by the agent builder.
Fields§
§messages: Vec<Message>§tools: Vec<ToolDefinition>§tool_choice: Option<ToolChoice>§system_prompt: Option<String>Implementations§
Source§impl ModelRequest
impl ModelRequest
Sourcepub fn to_chat_request(&self) -> ChatRequest
pub fn to_chat_request(&self) -> ChatRequest
Convert to a ChatRequest suitable for calling a ChatModel.
Trait Implementations§
Source§impl Clone for ModelRequest
impl Clone for ModelRequest
Source§fn clone(&self) -> ModelRequest
fn clone(&self) -> ModelRequest
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 moreAuto Trait Implementations§
impl Freeze for ModelRequest
impl RefUnwindSafe for ModelRequest
impl Send for ModelRequest
impl Sync for ModelRequest
impl Unpin for ModelRequest
impl UnsafeUnpin for ModelRequest
impl UnwindSafe for ModelRequest
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