Fix dependency and tests and updated docstring (#3337)

This commit is contained in:
Parshva Daftari
2025-08-19 02:12:24 +05:30
committed by GitHub
parent 346b913ace
commit c8ee17b884
6 changed files with 53 additions and 22 deletions
+5 -10
View File
@@ -11,16 +11,11 @@ import mem0
try:
import litellm
except ImportError:
user_input = input("The 'litellm' library is required. Install it now? [y/N]: ")
if user_input.lower() == "y":
try:
subprocess.check_call([sys.executable, "-m", "pip", "install", "litellm"])
import litellm
except subprocess.CalledProcessError:
print("Failed to install 'litellm'. Please install it manually using 'pip install litellm'.")
sys.exit(1)
else:
raise ImportError("The required 'litellm' library is not installed.")
try:
subprocess.check_call([sys.executable, "-m", "pip", "install", "litellm"])
import litellm
except subprocess.CalledProcessError:
print("Failed to install 'litellm'. Please install it manually using 'pip install litellm'.")
sys.exit(1)
from mem0 import Memory, MemoryClient