Pular para conteúdo

Historic messages schema

ExampleSchema

Bases: BaseModel

Represents an example data schema.

Attributes:

Name Type Description
name str

The name of the example entity.

description str | None

A brief description of the entity (can be None).

date str | None

The associated date in string format (can be None).

Source code in api/schemas/historic_messages_schema.py
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
class ExampleSchema(BaseModel):
    """
    Represents an example data schema.

    Attributes:
        name (str): 
            The name of the example entity.
        description (str | None): 
            A brief description of the entity (can be None).
        date (str | None): 
            The associated date in string format (can be None).
    """
    name: str
    description: str | None
    date: str | None

Message

Bases: BaseModel

Represents a user message containing a query and a reference to message history.

Attributes:

Name Type Description
message_history_id NonNegativeInt

A non-negative integer representing the message history ID.

query str

The content of the query sent by the user.

Source code in api/schemas/historic_messages_schema.py
19
20
21
22
23
24
25
26
27
28
29
30
class Message(BaseModel):
    """
    Represents a user message containing a query and a reference to message history.

    Attributes:
        message_history_id (NonNegativeInt): 
            A non-negative integer representing the message history ID.
        query (str): 
            The content of the query sent by the user.
    """
    message_history_id: NonNegativeInt
    query: str