Schema
CommandExplanation
dataclass
Represents a command explanation.
Attributes:
Name | Type | Description |
---|---|---|
command |
str
|
The command name. |
purpose |
str
|
The purpose of the command. |
syntax |
str
|
The syntax of the command. |
options |
list[str]
|
The available options for the command. |
examples |
list[str]
|
Examples of how to use the command. |
Source code in peter_explains/schema.py
from_response(response)
staticmethod
Creates a CommandExplanation object from a response string.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
response |
str
|
The response string containing the command explanation data. |
required |
Returns:
Name | Type | Description |
---|---|---|
CommandExplanation |
CommandExplanation
|
The CommandExplanation object created from the response. |
Source code in peter_explains/schema.py
CommandExplanationWithArguments
dataclass
Represents a command explanation with arguments.
Attributes:
Name | Type | Description |
---|---|---|
command |
str
|
The command name. |
purpose |
str
|
The purpose of the command. |
breakdown |
list[str]
|
The breakdown of the command. |
Source code in peter_explains/schema.py
from_response(response)
staticmethod
Creates a CommandExplanationWithArguments object from a response string.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
response |
str
|
The response string containing the command explanation data. |
required |
Returns:
Name | Type | Description |
---|---|---|
CommandExplanationWithArguments |
CommandExplanationWithArguments
|
The CommandExplanationWithArguments object created from the response. |