From ab4e0ec811a3c849cc95c159872860a2ab0a8589 Mon Sep 17 00:00:00 2001 From: Aisuko Date: Sun, 21 Jul 2024 17:19:26 +1000 Subject: [PATCH] try to fix input as a list Signed-off-by: Aisuko --- backend/src/repository/rag/chat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/repository/rag/chat.py b/backend/src/repository/rag/chat.py index 21ea4f0..89fc3cf 100644 --- a/backend/src/repository/rag/chat.py +++ b/backend/src/repository/rag/chat.py @@ -137,7 +137,7 @@ async def get_context_by_question(input_msg: str): except Exception as e: loguru.logger.error(e) # collection name for testing - context = vector_db.search(embedd_input, 1, collection_name="aisuko_squad01") + context = vector_db.search(list(embedd_input), 1, collection_name="aisuko_squad01") return context or InferenceHelper.instruction current_context = await get_context_by_question(input_msg)