pub struct CompletionRequest {
pub node: String,
pub model: ModelSelection,
pub system: Option<String>,
pub prompt: String,
pub context: Vec<(String, Value)>,
pub response_type: String,
pub shape: ResponseShape,
pub max_tokens: u32,
}Expand description
One model call.
Fields§
§node: StringNode id, for cassette matching and error messages.
model: ModelSelection§system: Option<String>§prompt: String§context: Vec<(String, Value)>Named context values rendered into the request, in declaration order.
response_type: StringThe Ingot type the caller declared.
shape: ResponseShape§max_tokens: u32Upper bound on output tokens for this call.
Implementations§
Trait Implementations§
Source§impl Clone for CompletionRequest
impl Clone for CompletionRequest
Source§fn clone(&self) -> CompletionRequest
fn clone(&self) -> CompletionRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CompletionRequest
impl RefUnwindSafe for CompletionRequest
impl Send for CompletionRequest
impl Sync for CompletionRequest
impl Unpin for CompletionRequest
impl UnsafeUnpin 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