Remove auto install library for chromadb (#1870)
This commit is contained in:
@@ -9,17 +9,7 @@ class ChromaDbConfig(BaseModel):
|
|||||||
try:
|
try:
|
||||||
from chromadb.api.client import Client
|
from chromadb.api.client import Client
|
||||||
except ImportError:
|
except ImportError:
|
||||||
user_input: Any = input("The 'chromadb' library is required. Install it now? [y/N]: ")
|
raise ImportError("The 'chromadb' library is required. Please install it using 'pip install chromadb'.")
|
||||||
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)
|
|
||||||
Client: ClassVar[type] = Client
|
Client: ClassVar[type] = Client
|
||||||
|
|
||||||
collection_name: str = Field("mem0", description="Default name for the collection")
|
collection_name: str = Field("mem0", description="Default name for the collection")
|
||||||
|
|||||||
Reference in New Issue
Block a user