Skip to content

Wx Assistant

src.data_models.wx_assistant.WxAssistantMessage

Bases: BaseModel

This is a class for WxAssistant messages.

Attributes:

Name Type Description
u Optional[str]

Represents the user input.

a Optional[str]

Represents the assistant response.

n Optional[bool]

An optional boolean for additional context.

Source code in src/data_models/wx_assistant.py
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
class WxAssistantMessage(BaseModel):
    """
    This is a class for WxAssistant messages.

    Attributes:
        u (Optional[str]): Represents the user input.
        a (Optional[str]): Represents the assistant response.
        n (Optional[bool]): An optional boolean for additional context.
    """
    u: Optional[str] = None
    a: Optional[str] = None
    n: Optional[bool] = None

    def to_dict(self):
        return {"u": self.u, "a": self.a, "n": self.n}

src.data_models.wx_assistant.WxAssistantConversationInput

Bases: BaseModel

This is a class for WxAssistant conversation input.

Attributes:

Name Type Description
messages List[WxAssistantMessage]

A list of WxAssistantMessage instances.

context Optional[ContextModel]

Optional metadata for additional context.

Source code in src/data_models/wx_assistant.py
26
27
28
29
30
31
32
33
34
35
class WxAssistantConversationInput(BaseModel):
    """
    This is a class for WxAssistant conversation input.

    Attributes:
        messages (List[WxAssistantMessage]): A list of WxAssistantMessage instances.
        context (Optional[ContextModel]): Optional metadata for additional context.
    """
    messages: List[WxAssistantMessage]
    context: Optional[ContextModel] = None