Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
fix db connection error in embed_documents() (#26196)
AkisAya66196459d5a9
diff --git a/api/core/rag/embedding/cached_embedding.py b/api/core/rag/embedding/cached_embedding.pyindex 5f94129a0c3..c2f17cd148a 100644--- a/api/core/rag/embedding/cached_embedding.py+++ b/api/core/rag/embedding/cached_embedding.py@@ -42,6 +42,10 @@ class CacheEmbedding(Embeddings):text_embeddings[i] = embedding.get_embedding()else:embedding_queue_indices.append(i)++ # release database connection, because embedding may take a long time+ db.session.close()+if embedding_queue_indices:embedding_queue_texts = [texts[i] for i in embedding_queue_indices]embedding_queue_embeddings = []