Merge pull request #4701 from ndrsfel/fix-rag-embedding-openai-batch-size-environment-variable

fix: RAG with OpenAI embedding models and batch_size environment variable fails silently
This commit is contained in:
Timothy Jaeryang Baek 2024-08-18 13:24:18 +02:00 committed by GitHub
commit 079f37a2d6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1055,7 +1055,7 @@ RAG_EMBEDDING_MODEL_TRUST_REMOTE_CODE = (
RAG_EMBEDDING_OPENAI_BATCH_SIZE = PersistentConfig( RAG_EMBEDDING_OPENAI_BATCH_SIZE = PersistentConfig(
"RAG_EMBEDDING_OPENAI_BATCH_SIZE", "RAG_EMBEDDING_OPENAI_BATCH_SIZE",
"rag.embedding_openai_batch_size", "rag.embedding_openai_batch_size",
os.environ.get("RAG_EMBEDDING_OPENAI_BATCH_SIZE", 1), int(os.environ.get("RAG_EMBEDDING_OPENAI_BATCH_SIZE", "1")),
) )
RAG_RERANKING_MODEL = PersistentConfig( RAG_RERANKING_MODEL = PersistentConfig(