pub struct LlmRequest {
pub model: String,
pub messages: Vec<LlmMessage>,
pub attachments: Vec<LlmAttachment>,
pub tools: Arc<Vec<LlmToolSpec>>,
pub tool_choice: LlmToolChoice,
pub model_variant: Option<String>,
pub generation: GenerationOptions,
pub scope: LlmRequestScope,
pub output_spec: Option<LlmOutputSpec>,
pub stream_events: Option<LlmEventSender>,
pub provider_trace: Option<LlmProviderTraceSender>,
}Expand description
Request/response/error vocabulary of Provider::complete,
re-exported so hosts can implement provider decorators (admission
gates, metrics taps) against the facade alone.
Fields§
§model: String§messages: Vec<LlmMessage>§attachments: Vec<LlmAttachment>§tools: Arc<Vec<LlmToolSpec>>§tool_choice: LlmToolChoice§model_variant: Option<String>§generation: GenerationOptions§scope: LlmRequestScope§output_spec: Option<LlmOutputSpec>§stream_events: Option<LlmEventSender>§provider_trace: Option<LlmProviderTraceSender>Implementations§
Source§impl LlmRequest
impl LlmRequest
pub fn session_id(&self) -> &str
pub fn agent_frame_id(&self) -> &str
pub fn request_id(&self) -> &str
pub fn continuation_key(&self) -> String
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 (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 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<LlmRequest, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<LlmRequest, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for LlmRequest
impl Serialize for LlmRequest
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl TryFrom<RemoteLlmRequest> for LlmRequest
impl TryFrom<RemoteLlmRequest> for LlmRequest
Source§type Error = RemoteProtocolError
type Error = RemoteProtocolError
The type returned in the event of a conversion error.
Source§fn try_from(
value: RemoteLlmRequest,
) -> Result<LlmRequest, <LlmRequest as TryFrom<RemoteLlmRequest>>::Error>
fn try_from( value: RemoteLlmRequest, ) -> Result<LlmRequest, <LlmRequest as TryFrom<RemoteLlmRequest>>::Error>
Performs the conversion.
Auto Trait Implementations§
impl !RefUnwindSafe for LlmRequest
impl !UnwindSafe for LlmRequest
impl Freeze for LlmRequest
impl Send for LlmRequest
impl Sync for LlmRequest
impl Unpin for LlmRequest
impl UnsafeUnpin 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