Update functions.py
Browse files- functions.py +2 -2
functions.py
CHANGED
@@ -181,13 +181,13 @@ def gen_embeddings(embedding_model):
|
|
181 |
return embeddings
|
182 |
|
183 |
@st.experimental_memo(suppress_st_warning=True)
|
184 |
-
def embed_text(query,title,embedding_model,_emb_tok,
|
185 |
|
186 |
'''Embed text and generate semantic search scores'''
|
187 |
|
188 |
title = title.split()[0].lower()
|
189 |
|
190 |
-
docs =
|
191 |
|
192 |
if chain_type == 'Normal':
|
193 |
|
|
|
181 |
return embeddings
|
182 |
|
183 |
@st.experimental_memo(suppress_st_warning=True)
|
184 |
+
def embed_text(query,title,embedding_model,_emb_tok,_docsearch,chain_type):
|
185 |
|
186 |
'''Embed text and generate semantic search scores'''
|
187 |
|
188 |
title = title.split()[0].lower()
|
189 |
|
190 |
+
docs = _docsearch.similarity_search_with_score(query, k=3)
|
191 |
|
192 |
if chain_type == 'Normal':
|
193 |
|