Commit 08737072 by tinywell

refactor: Fix issue with splitting similarity_doc_hash in get_similarity_doc function

parent 08987981
...@@ -260,8 +260,9 @@ def re_generate(chat_request: ReGenerateRequest, token: str = Header(None)): ...@@ -260,8 +260,9 @@ def re_generate(chat_request: ReGenerateRequest, token: str = Header(None)):
} }
def get_similarity_doc(similarity_doc_hash: str): def get_similarity_doc(similarity_doc_hash: str):
hashs = similarity_doc_hash.split(",") if hashs:
if len(hashs) == 0: hashs = similarity_doc_hash.split(",")
if not hashs or len(hashs) == 0:
return [] return []
docs = [] docs = []
txt_doc = TxtDoc(k_db) txt_doc = TxtDoc(k_db)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment