mirror of
https://github.com/open-webui/open-webui
synced 2024-11-06 00:32:05 +00:00
fix
This commit is contained in:
parent
b1b72441bb
commit
741ed5dc4c
@ -495,6 +495,7 @@ def store_docs_in_vector_db(docs, collection_name, overwrite: bool = False) -> b
|
||||
ids=[str(uuid.uuid1()) for _ in texts],
|
||||
metadatas=metadatas,
|
||||
embeddings=embeddings,
|
||||
documents=texts,
|
||||
):
|
||||
collection.add(*batch)
|
||||
|
||||
|
@ -43,6 +43,8 @@ def query_embeddings_doc(collection_name: str, query_embeddings, k: int):
|
||||
query_embeddings=[query_embeddings],
|
||||
n_results=k,
|
||||
)
|
||||
|
||||
log.info(f"query_embeddings_doc:result {result}")
|
||||
return result
|
||||
except Exception as e:
|
||||
raise e
|
||||
@ -155,7 +157,9 @@ def rag_messages(
|
||||
openai_key,
|
||||
openai_url,
|
||||
):
|
||||
log.debug(f"docs: {docs}")
|
||||
log.debug(
|
||||
f"docs: {docs} {messages} {embedding_engine} {embedding_model} {embedding_function} {openai_key} {openai_url}"
|
||||
)
|
||||
|
||||
last_user_message_idx = None
|
||||
for i in range(len(messages) - 1, -1, -1):
|
||||
|
Loading…
Reference in New Issue
Block a user