Remove auto install library for chromadb (#1870)
This commit is contained in:
@@ -9,17 +9,7 @@ class ChromaDbConfig(BaseModel):
|
||||
try:
|
||||
from chromadb.api.client import Client
|
||||
except ImportError:
|
||||
user_input: Any = input("The 'chromadb' library is required. Install it now? [y/N]: ")
|
||||
if user_input.lower() == 'y':
|
||||
try:
|
||||
subprocess.check_call([sys.executable, "-m", "pip", "install", "chromadb"])
|
||||
from chromadb.api.client import Client
|
||||
except subprocess.CalledProcessError:
|
||||
print("Failed to install 'chromadb'. Please install it manually using 'pip install chromadb'.")
|
||||
sys.exit(1)
|
||||
else:
|
||||
print("The required 'chromadb' library is not installed.")
|
||||
sys.exit(1)
|
||||
raise ImportError("The 'chromadb' library is required. Please install it using 'pip install chromadb'.")
|
||||
Client: ClassVar[type] = Client
|
||||
|
||||
collection_name: str = Field("mem0", description="Default name for the collection")
|
||||
|
||||
Reference in New Issue
Block a user