The Memory Layer for AI Agents - Drop-in memory infrastructure for AI agents and apps. Context that persists. Built for production.
Python agentic-memoryagentic-memory-systemagentsaiai-agentschatgptgenaillmlong-term-memorymemorymemory-managementpythonragstate-management
fix: embedding function config (#175)
cachho0c2653ccf5c2
diff --git a/embedchain/embedchain.py b/embedchain/embedchain.pyindex d3cf0ae4d..cc5e62de4 100644--- a/embedchain/embedchain.py+++ b/embedchain/embedchain.py@@ -364,15 +364,14 @@ class OpenSourceApp(EmbedChain)::param config: InitConfig instance to load as configuration. Optional. `ef` defaults to open source."""print("Loading open source embedding model. This may take some time...")- if not config or not config.ef:- if config is None:- config = InitConfig(- ef = embedding_functions.SentenceTransformerEmbeddingFunction(- model_name="all-MiniLM-L6-v2"- )+ if not config:+ config = InitConfig(+ ef = embedding_functions.SentenceTransformerEmbeddingFunction(+ model_name="all-MiniLM-L6-v2")- else:- config._set_embedding_function(+ )+ elif not config.ef:+ config._set_embedding_function(embedding_functions.SentenceTransformerEmbeddingFunction(model_name="all-MiniLM-L6-v2"))