pub struct ApplicationInvokeRequest {
pub app_id: String,
pub conversation_id: Option<String>,
pub third_request_id: Option<String>,
pub stream: bool,
pub messages: Vec<ApplicationInvokeMessage>,
pub role: Option<String>,
pub send_log_event: Option<bool>,
}Expand description
Request body for an application-v3 invocation.
Fields§
§app_id: StringApplication identifier.
conversation_id: Option<String>Conversation identifier; omitted to create a new conversation.
third_request_id: Option<String>Caller-provided tracing identifier for plugin invocations.
stream: boolStreaming flag. The JSON-only send_via path requires this to remain
false and serializes it explicitly because the server default is true.
messages: Vec<ApplicationInvokeMessage>Invocation messages.
role: Option<String>Top-level role required by some conversational applications.
send_log_event: Option<bool>Whether process-log events should be emitted.
Implementations§
Source§impl ApplicationInvokeRequest
impl ApplicationInvokeRequest
Sourcepub fn new(
app_id: impl Into<String>,
messages: Vec<ApplicationInvokeMessage>,
) -> Self
pub fn new( app_id: impl Into<String>, messages: Vec<ApplicationInvokeMessage>, ) -> Self
Create an invocation with all OpenAPI-required fields.
Sourcepub fn with_conversation_id(self, conversation_id: impl Into<String>) -> Self
pub fn with_conversation_id(self, conversation_id: impl Into<String>) -> Self
Continue an existing conversation.
Sourcepub fn with_third_request_id(self, third_request_id: impl Into<String>) -> Self
pub fn with_third_request_id(self, third_request_id: impl Into<String>) -> Self
Set a third-party tracing identifier.
Sourcepub fn with_log_events(self, enabled: bool) -> Self
pub fn with_log_events(self, enabled: bool) -> Self
Configure process-log event delivery.
Sourcepub async fn send_via(
&self,
client: &ZaiClient,
) -> ZaiResult<ApplicationInvokeResponse>
pub async fn send_via( &self, client: &ZaiClient, ) -> ZaiResult<ApplicationInvokeResponse>
Send the request through client.
Trait Implementations§
Source§impl Clone for ApplicationInvokeRequest
impl Clone for ApplicationInvokeRequest
Source§fn clone(&self) -> ApplicationInvokeRequest
fn clone(&self) -> ApplicationInvokeRequest
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 ApplicationInvokeRequest
impl Debug for ApplicationInvokeRequest
impl Eq for ApplicationInvokeRequest
Source§impl PartialEq for ApplicationInvokeRequest
impl PartialEq for ApplicationInvokeRequest
Source§impl Serialize for ApplicationInvokeRequest
impl Serialize for ApplicationInvokeRequest
impl StructuralPartialEq for ApplicationInvokeRequest
Auto Trait Implementations§
impl Freeze for ApplicationInvokeRequest
impl RefUnwindSafe for ApplicationInvokeRequest
impl Send for ApplicationInvokeRequest
impl Sync for ApplicationInvokeRequest
impl Unpin for ApplicationInvokeRequest
impl UnsafeUnpin for ApplicationInvokeRequest
impl UnwindSafe for ApplicationInvokeRequest
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.