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
Handle if no module found for bots (#564)
Dev Khantbdef85f7dbba
diff --git a/embedchain/bots/discord.py b/embedchain/bots/discord.pyindex d2984982d..2d2d482e4 100644--- a/embedchain/bots/discord.py+++ b/embedchain/bots/discord.py@@ -2,14 +2,21 @@ import argparseimport loggingimport os-import discord-from discord import app_commands-from discord.ext import commands-from embedchain.helper.json_serializable import register_deserializablefrom .base import BaseBot+try:+ import discord+ from discord import app_commands+ from discord.ext import commands+except ModuleNotFoundError:+ raise ModuleNotFoundError(+ "The required dependencies for Discord are not installed."+ 'Please install with `pip install "embedchain[discord]"`'+ ) from None++intents = discord.Intents.default()intents.message_content = Trueclient = discord.Client(intents=intents)diff --git a/embedchain/bots/poe.py b/embedchain/bots/poe.pyindex 58e82bfb7..ebd71824e 100644--- a/embedchain/bots/poe.py+++ b/embedchain/bots/poe.py@@ -3,12 +3,17 @@ import loggingimport osfrom typing import List, Optional-from fastapi_poe import PoeBot, run-from embedchain.helper.json_serializable import register_deserializablefrom .base import BaseBot+try:+ from fastapi_poe import PoeBot, run+except ModuleNotFoundError:+ raise ModuleNotFoundError(+ "The required dependencies for Poe are not installed." 'Please install with `pip install "embedchain[poe]"`'+ ) from None+def start_command():parser = argparse.ArgumentParser(description="EmbedChain PoeBot command line interface")