Skip to content

ElicitationResponse

Base classes

Name Children Inherits
Response
aclientp.schema.base
Base request model.

⋔ Inheritance diagram

graph TD
  95970857283696["elicitation.ElicitationResponse"]
  95970861210848["base.Response"]
  95970862258240["base.AnnotatedObject"]
  95970862254416["base.Schema"]
  95970851503232["main.BaseModel"]
  125067848591872["builtins.object"]
  95970861210848 --> 95970857283696
  95970862258240 --> 95970861210848
  95970862254416 --> 95970862258240
  95970851503232 --> 95970862254416
  125067848591872 --> 95970851503232

🛈 DocStrings

Bases: Response

Response from the client to an elicitation request.

Source code in src/aclientp/schema/elicitation.py
class ElicitationResponse(Response):
    """Response from the client to an elicitation request."""

    action: ElicitationActionType
    """The user's action."""

    content: dict[str, ElicitationContentValue] | None = None
    """For ``accept``: the user-provided content, as an object matching the requested schema."""

    @classmethod
    def accept(cls, content: dict[str, ElicitationContentValue] | None = None) -> Self:
        return cls(action="accept", content=content)

    @classmethod
    def decline(cls) -> Self:
        return cls(action="decline")

    @classmethod
    def cancel(cls) -> Self:
        return cls(action="cancel")

action instance-attribute

The user's action.

content class-attribute instance-attribute

content: dict[str, ElicitationContentValue] | None = None

For accept: the user-provided content, as an object matching the requested schema.

:fa-brands-github: Show source on GitHub