-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Description
Description
I am using AIMindTool to connect with minds_db.
but it throwing error that package is not installed even though package is there in invironment.
Steps to Reproduce
from crewai_tools import AIMindTool
import os
os.environ["MINDS_API_KEY"] = "None"
aimind_tool = AIMindTool(
datasources=[
{
"description": "runs data",
"engine": "postgres",
"connection_data": {
"user": "postgres",
"password": "xxxx",
"host": "xxxx",
"port": 5432,
"database": "ipdb",
#"schema": "runs"
},
"tables": ["runsdev"]
}
]
)
# Run a natural language query
result = aimind_tool.run("How many task get failed")
print(result)Expected behavior
should give counts
Screenshots/Code snippets
None
Operating System
Ubuntu 24.04
Python Version
3.12
crewAI Version
1.4.1
crewAI Tools Version
1.4.1
Virtual Environment
Conda
Evidence
Traceback (most recent call last):
File "/home/sunil/miniconda3/envs/mindsdb/lib/python3.13/site-packages/crewai_tools/tools/ai_mind_tool/ai_mind_tool.py", line 55, in init
from minds.datasources import DatabaseConfig # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: cannot import name 'DatabaseConfig' from 'minds.datasources' (/home/sunil/miniconda3/envs/mindsdb/lib/python3.13/site-packages/minds/datasources/init.py)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/sunil/arias/aria-ingest-tests/minds_db.py", line 7, in
aimind_tool = AIMindTool(
datasources=[
...<13 lines>...
]
)
File "/home/sunil/miniconda3/envs/mindsdb/lib/python3.13/site-packages/crewai_tools/tools/ai_mind_tool/ai_mind_tool.py", line 57, in init
raise ImportError(
"minds_sdk package not found, please run pip install minds-sdk"
) from e
ImportError: minds_sdk package not found, please run pip install minds-sdk
Possible Solution
None
Additional context
I already have minds_sdk installed.
pip show minds_sdk
Name: minds_sdk
Version: 2.0.0
Summary: An AI-Data Mind is an LLM with the built-in power to answer data questions for Agents
Home-page: https://github.com/mindsdb/minds_python_sdk
Author: MindsDB Inc
Author-email: hello@mindsdb.com
License:
Location: /home/sunil/miniconda3/envs/mindsdb/lib/python3.13/site-packages
Requires: openai, pydantic, requests
Required-by: