Skip to content

Config schema

AppConfig

Bases: BaseModel

Represents the configuration for an application task.

Attributes:

Name Type Description
user str

The user identifier associated with the task.

task_id str

A unique identifier for the task.

type_of_analysis str

The type of analysis to be performed.

service str

Service of the LLM. "azure" or "openai"

Source code in model/config_schema.py
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
class AppConfig(BaseModel):
    """
    Represents the configuration for an application task.

    Attributes:
        user (str): The user identifier associated with the task.
        task_id (str): A unique identifier for the task.
        type_of_analysis (str): The type of analysis to be performed.
        service (str): Service of the LLM. "azure" or "openai"
    """
    user: str
    task_id: str
    type_of_analysis: Optional[str] = Field(default="document")
    service: Optional[str] = Field(default="azure")
    language: Optional[str] = Field(default="english")

Evaluation

Bases: BaseModel

Represents an evaluation of a response or task.

Attributes:

Name Type Description
evaluation int

The evaluation score given to the response or task.

observation Optional[str]

Additional observations or notes related to the evaluation, default is None.

Source code in model/config_schema.py
63
64
65
66
67
68
69
70
71
72
class Evaluation(BaseModel):
    """
    Represents an evaluation of a response or task.

    Attributes:
        evaluation (int): The evaluation score given to the response or task.
        observation (Optional[str]): Additional observations or notes related to the evaluation, default is None.
    """
    evaluation: int
    observation: Optional[str] = None

SaveRedisPydantic

Bases: BaseModel

Represents a data model for saving responses and related information to Redis.

Attributes:

Name Type Description
response str

The response generated by the system.

context Optional[str]

Additional context for the response, default is an empty string.

usage str

Usage statistics related to the API call or response.

response_json str

The JSON representation of the system's response.

messages str

The messages exchanged during the interaction.

type_of_analysis str

The type of analysis related to the task.

technique Optional[str]

The technique used in the analysis, default is an empty string.

evaluation Optional[int]

An evaluation score for the response, default is 0.

observation Optional[str]

Observations related to the response, default is an empty string.

file_names Optional[str]

Names of files related to the response or task, default is an empty string.

Source code in model/config_schema.py
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
class SaveRedisPydantic(BaseModel):
    """
    Represents a data model for saving responses and related information to Redis.

    Attributes:
        response (str): The response generated by the system.
        context (Optional[str]): Additional context for the response, default is an empty string.
        usage (str): Usage statistics related to the API call or response.
        response_json (str): The JSON representation of the system's response.
        messages (str): The messages exchanged during the interaction.
        type_of_analysis (str): The type of analysis related to the task.
        technique (Optional[str]): The technique used in the analysis, default is an empty string.
        evaluation (Optional[int]): An evaluation score for the response, default is 0.
        observation (Optional[str]): Observations related to the response, default is an empty string.
        file_names (Optional[str]): Names of files related to the response or task, default is an empty string.
    """
    response: str
    context: Optional[str] = Field(default="")
    usage: str
    response_json: str
    messages: str
    type_of_analysis: str
    technique: Optional[str] = Field(default="")
    evaluation: Optional[int] = Field(default=0)
    observation: Optional[str] = Field(default="")
    file_names: Optional[str] = Field(default="")