mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-16 11:57:51 +01:00
refac: add embedding metadata
This commit is contained in:
@@ -698,7 +698,13 @@ def save_docs_to_vector_db(
|
|||||||
"id": str(uuid.uuid4()),
|
"id": str(uuid.uuid4()),
|
||||||
"text": text,
|
"text": text,
|
||||||
"vector": embeddings[idx],
|
"vector": embeddings[idx],
|
||||||
"metadata": metadatas[idx],
|
"metadata": {
|
||||||
|
**metadatas[idx],
|
||||||
|
"embedding": {
|
||||||
|
"engine": app.state.config.RAG_EMBEDDING_ENGINE,
|
||||||
|
"model": app.state.config.RAG_EMBEDDING_MODEL,
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
for idx, text in enumerate(texts)
|
for idx, text in enumerate(texts)
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user