agency.schema

 1from typing import Dict, Optional
 2
 3from pydantic import BaseModel, Field
 4
 5
 6class Meta(BaseModel):
 7    """A dictionary field for storing metadata about the message"""
 8
 9    class Config:
10        extra = "allow"
11        validate_assignment = True
12
13    id: str = Field(
14        ...,
15        description="The id of the message."
16    )
17
18    parent_id: Optional[str] = Field(
19        None,
20        description="The id of the previous message that generated this message."
21    )
22
23
24class Action(BaseModel):
25    """Schema for an action"""
26
27    class Config:
28        extra = "forbid"
29        validate_assignment = True
30
31    name: str = Field(
32        ...,
33        description="The name of the action."
34    )
35
36    args: Optional[Dict] = Field(
37        None,
38        description="The arguments for the action."
39    )
40
41
42class Message(BaseModel):
43    """The full message schema used for communication"""
44
45    class Config:
46        extra = "forbid"
47        validate_assignment = True
48
49    meta: Meta
50
51    from_: str = Field(
52        ...,
53        alias="from",
54        description="The id of the sender."
55    )
56
57    to: str = Field(
58        ...,
59        description="The intended recipient of the message. If set to `*`, the message is broadcast."
60    )
61
62    action: Action
class Meta(pydantic.main.BaseModel):
 7class Meta(BaseModel):
 8    """A dictionary field for storing metadata about the message"""
 9
10    class Config:
11        extra = "allow"
12        validate_assignment = True
13
14    id: str = Field(
15        ...,
16        description="The id of the message."
17    )
18
19    parent_id: Optional[str] = Field(
20        None,
21        description="The id of the previous message that generated this message."
22    )

A dictionary field for storing metadata about the message

id: str
parent_id: Optional[str]
model_config = {'extra': 'allow', 'validate_assignment': True}
model_fields = {'id': FieldInfo(annotation=str, required=True, description='The id of the message.'), 'parent_id': FieldInfo(annotation=Union[str, NoneType], required=False, description='The id of the previous message that generated this message.')}
Inherited Members
pydantic.main.BaseModel
BaseModel
model_computed_fields
model_extra
model_fields_set
model_construct
model_copy
model_dump
model_dump_json
model_json_schema
model_parametrized_name
model_post_init
model_rebuild
model_validate
model_validate_json
model_validate_strings
dict
json
parse_obj
parse_raw
parse_file
from_orm
construct
copy
schema
schema_json
validate
update_forward_refs
class Meta.Config:
10    class Config:
11        extra = "allow"
12        validate_assignment = True
extra = 'allow'
validate_assignment = True
class Action(pydantic.main.BaseModel):
25class Action(BaseModel):
26    """Schema for an action"""
27
28    class Config:
29        extra = "forbid"
30        validate_assignment = True
31
32    name: str = Field(
33        ...,
34        description="The name of the action."
35    )
36
37    args: Optional[Dict] = Field(
38        None,
39        description="The arguments for the action."
40    )

Schema for an action

name: str
args: Optional[Dict]
model_config = {'extra': 'forbid', 'validate_assignment': True}
model_fields = {'name': FieldInfo(annotation=str, required=True, description='The name of the action.'), 'args': FieldInfo(annotation=Union[Dict, NoneType], required=False, description='The arguments for the action.')}
Inherited Members
pydantic.main.BaseModel
BaseModel
model_computed_fields
model_extra
model_fields_set
model_construct
model_copy
model_dump
model_dump_json
model_json_schema
model_parametrized_name
model_post_init
model_rebuild
model_validate
model_validate_json
model_validate_strings
dict
json
parse_obj
parse_raw
parse_file
from_orm
construct
copy
schema
schema_json
validate
update_forward_refs
class Action.Config:
28    class Config:
29        extra = "forbid"
30        validate_assignment = True
extra = 'forbid'
validate_assignment = True
class Message(pydantic.main.BaseModel):
43class Message(BaseModel):
44    """The full message schema used for communication"""
45
46    class Config:
47        extra = "forbid"
48        validate_assignment = True
49
50    meta: Meta
51
52    from_: str = Field(
53        ...,
54        alias="from",
55        description="The id of the sender."
56    )
57
58    to: str = Field(
59        ...,
60        description="The intended recipient of the message. If set to `*`, the message is broadcast."
61    )
62
63    action: Action

The full message schema used for communication

meta: Meta
from_: str
to: str
action: Action
model_config = {'extra': 'forbid', 'validate_assignment': True}
model_fields = {'meta': FieldInfo(annotation=Meta, required=True), 'from_': FieldInfo(annotation=str, required=True, alias='from', alias_priority=2, description='The id of the sender.'), 'to': FieldInfo(annotation=str, required=True, description='The intended recipient of the message. If set to `*`, the message is broadcast.'), 'action': FieldInfo(annotation=Action, required=True)}
Inherited Members
pydantic.main.BaseModel
BaseModel
model_computed_fields
model_extra
model_fields_set
model_construct
model_copy
model_dump
model_dump_json
model_json_schema
model_parametrized_name
model_post_init
model_rebuild
model_validate
model_validate_json
model_validate_strings
dict
json
parse_obj
parse_raw
parse_file
from_orm
construct
copy
schema
schema_json
validate
update_forward_refs
class Message.Config:
46    class Config:
47        extra = "forbid"
48        validate_assignment = True
extra = 'forbid'
validate_assignment = True