#[non_exhaustive]pub struct PromptResponse {
pub message_id: MessageId,
pub meta: Option<Map<String, Value>>,
}unstable_protocol_v2 only.Expand description
Response acknowledging that a user prompt was inserted into the ACP conversation.
This response does not indicate that the prompt was merely received or queued, nor that the
agent has finished processing it.
Processing and completion are reported through state_update session updates.
See protocol docs: Prompt Accepted
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.message_id: MessageIdIdentifies the user message inserted into the ACP conversation.
Required and non-null. Omission and explicit null are both invalid.
The corresponding user-message session update carries this same identifier and may arrive before or after this response. Agents must echo the message during the live session, but are not required to retain it. If retained and replayed, the message keeps this identifier.
meta: Option<Map<String, Value>>The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
Implementations§
Source§impl PromptResponse
impl PromptResponse
Sourcepub fn new(message_id: impl Into<MessageId>) -> PromptResponse
pub fn new(message_id: impl Into<MessageId>) -> PromptResponse
Builds PromptResponse with the required response fields set; optional fields start unset or empty.
Sourcepub fn meta(self, meta: impl IntoOption<Map<String, Value>>) -> PromptResponse
pub fn meta(self, meta: impl IntoOption<Map<String, Value>>) -> PromptResponse
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
Trait Implementations§
Source§impl Clone for PromptResponse
impl Clone for PromptResponse
Source§fn clone(&self) -> PromptResponse
fn clone(&self) -> PromptResponse
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PromptResponse
impl Debug for PromptResponse
Source§impl<'de> Deserialize<'de> for PromptResponse
impl<'de> Deserialize<'de> for PromptResponse
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PromptResponse, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PromptResponse, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for PromptResponse
Source§impl JsonRpcResponse for PromptResponse
impl JsonRpcResponse for PromptResponse
Source§impl JsonSchema for PromptResponse
impl JsonSchema for PromptResponse
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for PromptResponse
impl PartialEq for PromptResponse
Source§impl Serialize for PromptResponse
impl Serialize for PromptResponse
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,
impl StructuralPartialEq for PromptResponse
Auto Trait Implementations§
impl Freeze for PromptResponse
impl RefUnwindSafe for PromptResponse
impl Send for PromptResponse
impl Sync for PromptResponse
impl Unpin for PromptResponse
impl UnsafeUnpin for PromptResponse
impl UnwindSafe for PromptResponse
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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
key and return true if they are equal.