pub struct DirectRequest {
pub model: String,
pub model_variant: Option<String>,
pub messages: Vec<DirectMessage>,
pub attachments: Vec<LlmAttachment>,
pub output: DirectOutputSpec,
pub generation: GenerationOptions,
pub stream_events: Option<LlmEventSender>,
pub session_id: Option<String>,
pub caused_by: Option<CausalRef>,
pub replay: Option<RuntimeReplay>,
}Fields§
§model: String§model_variant: Option<String>§messages: Vec<DirectMessage>§attachments: Vec<LlmAttachment>§output: DirectOutputSpec§generation: GenerationOptions§stream_events: Option<LlmEventSender>§session_id: Option<String>§caused_by: Option<CausalRef>§replay: Option<RuntimeReplay>Implementations§
Source§impl DirectRequest
impl DirectRequest
pub fn text(model: impl Into<String>, prompt: impl Into<String>) -> Self
pub fn json(model: impl Into<String>, prompt: impl Into<String>) -> Self
pub fn json_schema( model: impl Into<String>, prompt: impl Into<String>, schema: DirectJsonSchema, ) -> Self
pub fn with_replay_key(self, key: impl Into<String>) -> Self
pub fn with_caused_by(self, caused_by: CausalRef) -> Self
Trait Implementations§
Source§impl Clone for DirectRequest
impl Clone for DirectRequest
Source§fn clone(&self) -> DirectRequest
fn clone(&self) -> DirectRequest
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 moreSource§impl Debug for DirectRequest
impl Debug for DirectRequest
Source§impl<'de> Deserialize<'de> for DirectRequest
impl<'de> Deserialize<'de> for DirectRequest
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 !RefUnwindSafe for DirectRequest
impl !UnwindSafe for DirectRequest
impl Freeze for DirectRequest
impl Send for DirectRequest
impl Sync for DirectRequest
impl Unpin for DirectRequest
impl UnsafeUnpin for DirectRequest
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