新增工程信息、检索的知识片段节点回传、下一轮建议问题列表

This commit is contained in:
wanyaokun
2024-08-30 16:42:36 +08:00
parent 73565b26e4
commit e7628809ad
11 changed files with 411 additions and 134 deletions
+8 -8
View File
@@ -7,15 +7,15 @@ logger = logging.getLogger("uvicorn")
def get_index(**args):
logger.info("Connecting vector store...")
prjFlags = get_document_Types()
if len(prjFlags)<=0:
return None
prjFlag = args.get('prjFlag','')
flag = prjFlags[0] if prjFlag not in prjFlags else prjFlag
if 'prjFlag' in args:
prjFlags = get_document_Types()
if len(prjFlags)<=0:
return None
prjFlag = args.get('prjFlag','')
flag = prjFlags[0] if prjFlag not in prjFlags else prjFlag
else:
flag = ''
store = get_vector_store(flag)
# Load the index from the vector store
# If you are using a vector store that doesn't store text,
# you must load the index from both the vector store and the document store
index = VectorStoreIndex.from_vector_store(store)
logger.info("Finished load index from vector store.")
return index