ElicitationRequest
Base classes¶
| Name | Children | Inherits |
|---|---|---|
| Request aclientp.schema.base Base request model. |
â‹” Inheritance diagram¶
graph TD
95970857280352["elicitation.ElicitationRequest"]
95970858197488["base.Request"]
95970862258240["base.AnnotatedObject"]
95970862254416["base.Schema"]
95970851503232["main.BaseModel"]
125067848591872["builtins.object"]
95970858197488 --> 95970857280352
95970862258240 --> 95970858197488
95970862254416 --> 95970862258240
95970851503232 --> 95970862254416
125067848591872 --> 95970851503232
🛈 DocStrings¶
Bases: Request
Request from the agent to elicit structured user input (elicitation/create).
The agent sends this to the client to request information from the user, either via a form or by directing them to a URL.
Mode and scope fields are flattened into the request on the wire:
mode: "form"carriesrequested_schema.mode: "url"carrieselicitation_idandurl.- Session scope sets
session_id(and optionallytool_call_id), request scope setsrequest_id(e.g. during auth before any session exists).
Source code in src/aclientp/schema/elicitation.py
296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 | |
elicitation_id
class-attribute
instance-attribute
¶
URL mode: the unique identifier for this elicitation.
request_id
class-attribute
instance-attribute
¶
Request scope: the JSON-RPC request this elicitation is tied to.
requested_schema
class-attribute
instance-attribute
¶
requested_schema: ElicitationSchema | None = None
Form mode: a JSON Schema describing the form fields to present to the user.
session_id
class-attribute
instance-attribute
¶
Session scope: the session this elicitation is tied to.
tool_call_id
class-attribute
instance-attribute
¶
Session scope: optional tool call within the session.
url
class-attribute
instance-attribute
¶
URL mode: the URL to direct the user to.
form
classmethod
¶
form(
message: str,
schema: ElicitationSchema,
*,
session_id: str | None = None,
tool_call_id: str | None = None,
request_id: int | str | None = None,
) -> Self
Create a form-based elicitation request.
Source code in src/aclientp/schema/elicitation.py
url_based
classmethod
¶
url_based(
message: str,
elicitation_id: str,
url: str,
*,
session_id: str | None = None,
tool_call_id: str | None = None,
request_id: int | str | None = None,
) -> Self
Create a URL-based elicitation request.