JoeArmani commited on
Commit
19403c5
·
1 Parent(s): f7b283c

small signature update

Browse files
Files changed (1) hide show
  1. chatbot_model.py +14 -1
chatbot_model.py CHANGED
@@ -112,7 +112,10 @@ class EncoderModel(tf.keras.Model):
112
 
113
  class RetrievalChatbot(DeviceAwareModel):
114
  """Retrieval-based chatbot using pretrained embeddings and FAISS for similarity search."""
115
- def __init__(self, config: ChatbotConfig, dialogues: List[dict] = [], device: str = None, strategy=None, reranker: Optional[CrossEncoderReranker] = None, summarizer: Optional[Summarizer] = None):
 
 
 
116
  self.config = config
117
  self.strategy = strategy
118
  self.setup_device(device)
@@ -991,6 +994,16 @@ class RetrievalChatbot(DeviceAwareModel):
991
  conversation_parts.append(f"{self.special_tokens['user']} {query}")
992
  return "\n".join(conversation_parts)
993
 
 
 
 
 
 
 
 
 
 
 
994
  # def prepare_dataset(
995
  # self,
996
  # dialogues: List[dict],
 
112
 
113
  class RetrievalChatbot(DeviceAwareModel):
114
  """Retrieval-based chatbot using pretrained embeddings and FAISS for similarity search."""
115
+ def __init__(self, config: ChatbotConfig, dialogues: List[dict] = [], device: str = None,
116
+ strategy=None, reranker: Optional[CrossEncoderReranker] = None,
117
+ summarizer: Optional[Summarizer] = None
118
+ ):
119
  self.config = config
120
  self.strategy = strategy
121
  self.setup_device(device)
 
994
  conversation_parts.append(f"{self.special_tokens['user']} {query}")
995
  return "\n".join(conversation_parts)
996
 
997
+
998
+
999
+
1000
+
1001
+
1002
+
1003
+
1004
+
1005
+
1006
+
1007
  # def prepare_dataset(
1008
  # self,
1009
  # dialogues: List[dict],