MCPcopy Index your code
hub / github.com/1Panel-dev/MaxKB / search

Method search

apps/knowledge/vector/base_vector.py:161–177  ·  view source on GitHub ↗
(
        self,
        query_text,
        knowledge_id_list: list[str],
        exclude_document_id_list: list[str],
        exclude_paragraph_list: list[str],
        is_active: bool,
        embedding: Embeddings,
    )

Source from the content-addressed store, hash-verified

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(

Callers 13

write_imageFunction · 0.80
save_problemFunction · 0.80
_update_aws_credentialsFunction · 0.80
parse_result_reasonMethod · 0.80
reset_fieldMethod · 0.80
json_loadsFunction · 0.80
get_charset_listMethod · 0.80
process_responseMethod · 0.80
get_image_listFunction · 0.80
get_image_listFunction · 0.80

Calls 3

queryMethod · 0.95
normalize_for_embeddingFunction · 0.85
embed_queryMethod · 0.45

Tested by

no test coverage detected