Pular para conteúdo

Sql agentic rag schema

SQLInjectionStatus

Bases: BaseModel

Represents the security status of an SQL query regarding SQL injection threats.

Attributes:

Name Type Description
status Literal['Insecure', 'Secure']

A status indicating whether the SQL query is "Secure" or "Insecure".

Source code in api/schemas/sql_agentic_rag_schema.py
 4
 5
 6
 7
 8
 9
10
11
12
class SQLInjectionStatus(BaseModel):
    """
    Represents the security status of an SQL query regarding SQL injection threats.

    Attributes:
        status (Literal["Insecure", "Secure"]): 
            A status indicating whether the SQL query is "Secure" or "Insecure".
    """
    status: Literal["Insecure", "Secure"]

SerializableChatSchema

Bases: BaseModel

Represents a serializable chat message.

Attributes:

Name Type Description
role Literal['human', 'assistant']

The role of the sender, either "human" or "assistant".

content str

The content of the message.

Source code in api/schemas/sql_agentic_rag_schema.py
14
15
16
17
18
19
20
21
22
23
24
25
class SerializableChatSchema(BaseModel):
    """
    Represents a serializable chat message.

    Attributes:
        role (Literal["human", "assistant"]): 
            The role of the sender, either "human" or "assistant".
        content (str): 
            The content of the message.
    """
    role: Literal["human", "assistant"]
    content: str