Skip to content

Command

Base classes

Name Children Inherits
AnnotatedObject
aclientp.schema.v2.base
A v2 object with the ``_meta`` extension point.

⋔ Inheritance diagram

graph TD
  95970865069632["commands.Command"]
  95970868359040["base.AnnotatedObject"]
  95970855946400["base.Schema"]
  95970851503232["main.BaseModel"]
  125067848591872["builtins.object"]
  95970868359040 --> 95970865069632
  95970855946400 --> 95970868359040
  95970851503232 --> 95970855946400
  125067848591872 --> 95970851503232

🛈 DocStrings

Bases: AnnotatedObject

A slash command the user invokes by including /name in a prompt.

Source code in src/aclientp/schema/v2/commands.py
class Command(AnnotatedObject):
    """A slash command the user invokes by including ``/name`` in a prompt."""

    type: Literal["command"] = Field(default="command", init=False)

    name: str
    """Command name without the leading ``/``, e.g. ``create_plan``; no whitespace."""

    description: str
    """What the command does."""

    input: AvailableCommandInput | MISSING | None = MISSING
    """The command's input; omitted means it takes none."""

description instance-attribute

description: str

What the command does.

input class-attribute instance-attribute

input: AvailableCommandInput | MISSING | None = MISSING

The command's input; omitted means it takes none.

name instance-attribute

name: str

Command name without the leading /, e.g. create_plan; no whitespace.

:fa-brands-github: Show source on GitHub