Struct rig::completion::CompletionRequest
source · pub struct CompletionRequest {
pub prompt: String,
pub preamble: Option<String>,
pub chat_history: Vec<Message>,
pub documents: Vec<Document>,
pub tools: Vec<ToolDefinition>,
pub temperature: Option<f64>,
pub additional_params: Option<Value>,
}
Expand description
Struct representing a general completion request that can be sent to a completion model provider.
Fields§
§prompt: String
The prompt to be sent to the completion model provider
preamble: Option<String>
The preamble to be sent to the completion model provider
chat_history: Vec<Message>
The chat history to be sent to the completion model provider
documents: Vec<Document>
The documents to be sent to the completion model provider
tools: Vec<ToolDefinition>
The tools to be sent to the completion model provider
temperature: Option<f64>
The temperature to be sent to the completion model provider
additional_params: Option<Value>
Additional provider-specific parameters to be sent to the completion model provider
Auto Trait Implementations§
impl Freeze for CompletionRequest
impl RefUnwindSafe for CompletionRequest
impl Send for CompletionRequest
impl Sync for CompletionRequest
impl Unpin for CompletionRequest
impl UnwindSafe for CompletionRequest
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