#[non_exhaustive]pub struct PromptSuggestionsUpdate {
pub suggestions: Vec<PromptSuggestion>,
pub meta: Option<Map<String, Value>>,
}Expand description
UNSTABLE
This capability is not part of the spec yet, and may be removed or changed at any point.
Replaces the session’s current list of prompt suggestions.
A prompt suggestion is a prompt the Agent predicts the user will send next. The Client offers suggestions where the user writes the next prompt. The list in the most recent update is the current list until the Agent sends another update. A session starts with an empty list.
Suggestions are not part of session history. Agents SHOULD NOT include this update when they replay a session.
Agents MUST only send this update when the Client advertised
the session.promptSuggestions Client capability.
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.suggestions: Vec<PromptSuggestion>The suggestions the Client can offer, ordered most likely first.
Required and non-null. An empty list withdraws the suggestions the Client is offering.
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 PromptSuggestionsUpdate
impl PromptSuggestionsUpdate
Sourcepub fn new(suggestions: Vec<PromptSuggestion>) -> PromptSuggestionsUpdate
Available on crate feature unstable_prompt_suggestions only.
pub fn new(suggestions: Vec<PromptSuggestion>) -> PromptSuggestionsUpdate
unstable_prompt_suggestions only.Builds PromptSuggestionsUpdate with the required fields set. Optional fields start unset or empty.
Pass an empty list to withdraw the suggestions the Client is offering.
Sourcepub fn meta(
self,
meta: impl IntoOption<Map<String, Value>>,
) -> PromptSuggestionsUpdate
Available on crate feature unstable_prompt_suggestions only.
pub fn meta( self, meta: impl IntoOption<Map<String, Value>>, ) -> PromptSuggestionsUpdate
unstable_prompt_suggestions only.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 PromptSuggestionsUpdate
impl Clone for PromptSuggestionsUpdate
Source§fn clone(&self) -> PromptSuggestionsUpdate
fn clone(&self) -> PromptSuggestionsUpdate
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 PromptSuggestionsUpdate
impl Debug for PromptSuggestionsUpdate
Source§impl<'de> Deserialize<'de> for PromptSuggestionsUpdate
impl<'de> Deserialize<'de> for PromptSuggestionsUpdate
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PromptSuggestionsUpdate, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PromptSuggestionsUpdate, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for PromptSuggestionsUpdate
Source§impl JsonSchema for PromptSuggestionsUpdate
impl JsonSchema for PromptSuggestionsUpdate
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 PromptSuggestionsUpdate
impl PartialEq for PromptSuggestionsUpdate
Source§impl Serialize for PromptSuggestionsUpdate
impl Serialize for PromptSuggestionsUpdate
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 PromptSuggestionsUpdate
Auto Trait Implementations§
impl Forget for PromptSuggestionsUpdate
impl Freeze for PromptSuggestionsUpdate
impl Move for PromptSuggestionsUpdate
impl RefUnwindSafe for PromptSuggestionsUpdate
impl Send for PromptSuggestionsUpdate
impl Sync for PromptSuggestionsUpdate
impl Unpin for PromptSuggestionsUpdate
impl UnsafeUnpin for PromptSuggestionsUpdate
impl UnwindSafe for PromptSuggestionsUpdate
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.