Update functions.py
Browse files- functions.py +4 -0
functions.py
CHANGED
@@ -177,8 +177,12 @@ def embed_text(query,corpus,title,embedding_model,_emb_tok,chain_type='stuff'):
|
|
177 |
|
178 |
docs = docsearch.similarity_search_with_score(query, k=3, namespace = f'{title}-earnings')
|
179 |
|
|
|
|
|
180 |
if chain_type == 'Normal':
|
181 |
|
|
|
|
|
182 |
PROMPT = PromptTemplate(template=template,
|
183 |
input_variables=["summaries", "question"],
|
184 |
output_parser=output_parser)
|
|
|
177 |
|
178 |
docs = docsearch.similarity_search_with_score(query, k=3, namespace = f'{title}-earnings')
|
179 |
|
180 |
+
print(docs)
|
181 |
+
|
182 |
if chain_type == 'Normal':
|
183 |
|
184 |
+
docs = [d[0] for d in docs]
|
185 |
+
|
186 |
PROMPT = PromptTemplate(template=template,
|
187 |
input_variables=["summaries", "question"],
|
188 |
output_parser=output_parser)
|