#[non_exhaustive]pub struct CreateElicitationRequest {
pub mode: ElicitationMode,
pub message: String,
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.
Request from the agent to elicit structured user input.
The agent sends this to the client to request information from the user, either via a form or by directing them to a URL. Elicitations are tied to a session (optionally a tool call) or a request.
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.mode: ElicitationModeThe elicitation mode and its mode-specific fields.
message: StringA human-readable message describing what input is needed.
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 CreateElicitationRequest
impl CreateElicitationRequest
pub fn new( mode: impl Into<ElicitationMode>, message: impl Into<String>, ) -> CreateElicitationRequest
Sourcepub fn scope(&self) -> &ElicitationScope
pub fn scope(&self) -> &ElicitationScope
Returns the scope this elicitation is tied to.
Sourcepub fn meta(
self,
meta: impl IntoOption<Map<String, Value>>,
) -> CreateElicitationRequest
pub fn meta( self, meta: impl IntoOption<Map<String, Value>>, ) -> CreateElicitationRequest
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 CreateElicitationRequest
impl Clone for CreateElicitationRequest
Source§fn clone(&self) -> CreateElicitationRequest
fn clone(&self) -> CreateElicitationRequest
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 CreateElicitationRequest
impl Debug for CreateElicitationRequest
Source§impl<'de> Deserialize<'de> for CreateElicitationRequest
impl<'de> Deserialize<'de> for CreateElicitationRequest
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CreateElicitationRequest, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CreateElicitationRequest, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl IntoV2 for CreateElicitationRequest
Available on crate feature unstable_elicitation only.
impl IntoV2 for CreateElicitationRequest
unstable_elicitation only.Source§type Output = CreateElicitationRequest
type Output = CreateElicitationRequest
Source§fn into_v2(
self,
) -> Result<<CreateElicitationRequest as IntoV2>::Output, ProtocolConversionError>
fn into_v2( self, ) -> Result<<CreateElicitationRequest as IntoV2>::Output, ProtocolConversionError>
Source§impl JsonRpcMessage for CreateElicitationRequest
impl JsonRpcMessage for CreateElicitationRequest
Source§fn matches_method(method: &str) -> bool
fn matches_method(method: &str) -> bool
Source§fn to_untyped_message(&self) -> Result<UntypedMessage, Error>
fn to_untyped_message(&self) -> Result<UntypedMessage, Error>
Source§impl JsonRpcRequest for CreateElicitationRequest
impl JsonRpcRequest for CreateElicitationRequest
Source§type Response = CreateElicitationResponse
type Response = CreateElicitationResponse
Source§impl JsonSchema for CreateElicitationRequest
impl JsonSchema for CreateElicitationRequest
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 CreateElicitationRequest
impl PartialEq for CreateElicitationRequest
Source§fn eq(&self, other: &CreateElicitationRequest) -> bool
fn eq(&self, other: &CreateElicitationRequest) -> bool
self and other values to be equal, and is used by ==.