Refactor SNOMED-CT_Assistant.py to use 'descriptions' instead of 'documents' in get_dict_from_chroma_results
Browse files- SNOMED-CT_Assistant.py +1 -1
SNOMED-CT_Assistant.py
CHANGED
@@ -105,7 +105,7 @@ def query_chroma_db(query_text, query_number):
|
|
105 |
|
106 |
# Func: chroma_db_result to dict
|
107 |
def get_dict_from_chroma_results(results):
|
108 |
-
result_dict = {'ids': results['ids'][0], 'concept_ids': [ str(sub['concept_id']) for sub in results['metadatas'][0] ], 'distances': results['distances'][0], '
|
109 |
return result_dict
|
110 |
|
111 |
|
|
|
105 |
|
106 |
# Func: chroma_db_result to dict
|
107 |
def get_dict_from_chroma_results(results):
|
108 |
+
result_dict = {'ids': results['ids'][0], 'concept_ids': [ str(sub['concept_id']) for sub in results['metadatas'][0] ], 'distances': results['distances'][0], 'descriptions': results['documents'][0]}
|
109 |
return result_dict
|
110 |
|
111 |
|