Skip to content

armgit / mem0

Public Imported from GitHub
0

The Memory Layer for AI Agents - Drop-in memory infrastructure for AI agents and apps. Context that persists. Built for production.

[refactor] Use pipeline for bots instead of App (#936)

Sidharth Mohantyc45413969a44
diff --git a/embedchain/bots/base.py b/embedchain/bots/base.py
index 41d5ee96f..db3bd4339 100644
--- a/embedchain/bots/base.py
+++ b/embedchain/bots/base.py
@@ -1,10 +1,9 @@
from typing import Any
-from embedchain import App
-from embedchain.config import AddConfig, AppConfig, BaseLlmConfig
+from embedchain import Pipeline as App
+from embedchain.config import AddConfig, PipelineConfig, BaseLlmConfig
from embedchain.embedder.openai import OpenAIEmbedder
-from embedchain.helper.json_serializable import (JSONSerializable,
- register_deserializable)
+from embedchain.helper.json_serializable import JSONSerializable, register_deserializable
from embedchain.llm.openai import OpenAILlm
from embedchain.vectordb.chroma import ChromaDB
@@ -12,7 +11,7 @@ from embedchain.vectordb.chroma import ChromaDB
@register_deserializable
class BaseBot(JSONSerializable):
def __init__(self):
- self.app = App(config=AppConfig(), llm=OpenAILlm(), db=ChromaDB(), embedder=OpenAIEmbedder())
+ self.app = App(config=PipelineConfig(), llm=OpenAILlm(), db=ChromaDB(), embedding_model=OpenAIEmbedder())
def add(self, data: Any, config: AddConfig = None):
"""