-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add support for IBM watsonx.ai models #1121
Conversation
intialize test script
Update documentation Formatting
Update documentation Formatting
Thanks a lot @rahulkalluri. Tests are failing, can you check it out? |
After some quick investigation it looks like the ibm-watsonx-ai package requires python 3.10 and up. Would it be okay with updating the pandasai requirements to minimum of python 3.10? |
@rahulkalluri I think this is something we need to discuss with the community. But since it's an optional dependency, you can make it only available for some python versions: For example:
Hope it helps |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't the langchain
integration enough?
I saw other users were having issues using the langchain integration, plus I thought having a more native integration would be easier to use. |
When I tried using it for IBM Watson (a couple of months ago) I didn't run into any issues. Did you face any? |
To be honest I tried and couldn't figure out how to leverage langchain with pandas and watsonx. On top of that, the package the documentation refers to is now deprecated and is superseded by ibm-watsonx-ai which I've included here. Since I wasn't able to figure it out and I saw the open issue, I thought it would be best to have a more native integration with watsonx, similar to other vendors like Amazon/Google. |
@rahulkalluri almost there, could you fix the linting errors? Also, what issue where you facing with LangChain? |
Minor rename of test class
Sorry about that! Ran through the tests, we should be good to go now. On the LangChain stuff, I think it's more user error than anything. Nothing was broken, and I'll post in the Discord for some help if need be. |
Hey @gventuri I see the test failed on Python 3.9 which makes sense since the ibm-watsonx-ai package only works on 3.10 and above. Are you able to trigger the CI builds for 3.10+ only? |
@rahulkalluri can we temporarily use a skipif for the old version? i.e.
What do you think? We don't want to drop the support for python 3.8 yet! |
Shift imports around in case Python<3.10 Suggest user install IBM package
Absolutely, PandasAI should continue to support Python 3.9. I was not aware of the pytest skip but I've implemented that alongside some other minor changes to ensure users won't have issues if they're using Python 3.9. Thanks for the suggestion! |
@rahulkalluri thanks a lot for the effort, merging! |
Does not work still.. One observation, it shows working sometimes when you try to first run the script with other platform like gemini.. the results are updated into the cache and then if you run with watsonx, it does not run. I tried to remove all cache and log files.. then u get the error. Suggest testing it in a clean folder. Sending the code, data file, log file for your analysis... renamed the python script as testpa-wx.py.txt |
This tool https://pypi.org/project/ibm-watsonx-ai doesn't support py3.12, and maybe 3.11 Could we remove the ibm-watsonx-ai support and got the py3.12 support ? @rahulkalluri @gventuri |
Adding using the ibm-watsonx-ai package as another LLM method. At this time, the watsonx.ai package does not support multi-turn conversations (I've included that in the updated docs).