(
self,
query_text,
knowledge_id_list: list[str],
exclude_document_id_list: list[str],
exclude_paragraph_list: list[str],
is_active: bool,
embedding: Embeddings,
)
| 159 | pass |
| 160 | |
| 161 | def search( |
| 162 | self, |
| 163 | query_text, |
| 164 | knowledge_id_list: list[str], |
| 165 | exclude_document_id_list: list[str], |
| 166 | exclude_paragraph_list: list[str], |
| 167 | is_active: bool, |
| 168 | embedding: Embeddings, |
| 169 | ): |
| 170 | if knowledge_id_list is None or len(knowledge_id_list) == 0: |
| 171 | return [] |
| 172 | query_text = normalize_for_embedding(query_text) |
| 173 | embedding_query = embedding.embed_query(query_text) |
| 174 | result = self.query( |
| 175 | embedding_query, knowledge_id_list, exclude_document_id_list, exclude_paragraph_list, is_active, 1, 3, 0.65 |
| 176 | ) |
| 177 | return result[0] |
| 178 | |
| 179 | @abstractmethod |
| 180 | def query( |
no test coverage detected