Spaces:
Runtime error
Runtime error
adding the content model
Browse files
src/ctp_slack_bot/models/content.py
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from pydantic import BaseModel, Field
|
2 |
+
from typing import Optional, List, Dict, Any
|
3 |
+
from ctp_slack_bot.models.slack import SlackMessage
|
4 |
+
|
5 |
+
class RetreivedContext(BaseModel):
|
6 |
+
"""Represents a the context of a question from Slack returned from the Vector Store Database.
|
7 |
+
|
8 |
+
contextual_text: The text that is relevant to the question.
|
9 |
+
metadata_source: The source of the contextual text.
|
10 |
+
similarity_score: The similarity score of the contextual text to the question.
|
11 |
+
|
12 |
+
in_reation_to_question: OPTINAL: The question that the contextual text is related to.
|
13 |
+
"""
|
14 |
+
contextual_text: str
|
15 |
+
metadata_source: str
|
16 |
+
similarity_score: float
|
17 |
+
in_reation_to_question: str = None
|
18 |
+
|