File size: 743 Bytes
ccde5ae
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3799925
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from pydantic import BaseModel, Field
from typing import Optional, List, Dict, Any
from ctp_slack_bot.models.slack import SlackMessage

class RetreivedContext(BaseModel):
    """Represents a the context of a question from Slack returned from the Vector Store Database.
    
    contextual_text: The text that is relevant to the question.
    metadata_source: The source of the contextual text.
    similarity_score: The similarity score of the contextual text to the question.

    in_reation_to_question: OPTINAL:  The question that the contextual text is related to.
    """
    contextual_text: str
    metadata_source: str
    similarity_score: float
    
    said_by: str = Optional[None]
    in_reation_to_question: str = Optional[None]