Skip to content

armgit / dify

Public Imported from GitHub
0

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.

fix i is not incremented due to violating the uniqueness constraint w… (#771)

lixiaoyincc277227ad05
diff --git a/api/core/embedding/cached_embedding.py b/api/core/embedding/cached_embedding.py
index 174f2594568..045b13ea3f8 100644
--- a/api/core/embedding/cached_embedding.py
+++ b/api/core/embedding/cached_embedding.py
@@ -44,8 +44,8 @@ class CacheEmbedding(Embeddings):
except:
logging.exception('Failed to add embedding to db')
continue
-
- i += 1
+ finally:
+ i += 1
text_embeddings.extend(embedding_results)
return text_embeddings