fix: Fix OpenAI batch embedding

This commit is contained in:
Hwang In Tak 2024-09-26 20:48:14 +09:00
parent a4bc0b2829
commit 4fe1f2487d
No known key found for this signature in database
1 changed files with 3 additions and 1 deletions

View File

@ -1112,7 +1112,9 @@ def store_docs_in_vector_db(
app.state.config.RAG_EMBEDDING_OPENAI_BATCH_SIZE,
)
embedding_texts = list(map(lambda x: x.replace("\n", " "), texts))
embedding_texts = embedding_function(
list(map(lambda x: x.replace("\n", " "), texts))
)
VECTOR_DB_CLIENT.insert(
collection_name=collection_name,