Open tocer opened 2 weeks ago
Hey there, @tocer! I'm here to help you with any bugs, questions, and contributions while waiting for a human maintainer. If you need assistance, feel free to ask!
The code snippet in the documentation should indeed use ChatOpenAI
instead of OpenAI
. Here is the corrected version:
from pandasai import SmartDataframe
from pandasai.llm import ChatOpenAI
llm = ChatOpenAI(api_token="my-openai-api-key")
df = SmartDataframe("data.csv", config={"llm": llm})
This change ensures that the correct class is used for initializing the OpenAI object with PandasAI [1][2].
To continue talking to Dosu, mention @dosu.
System Info
pandasai==2.1 python==3.12
🐛 Describe the bug
https://docs.pandas-ai.com/llms#langchain-models
OpenAI should be ChatOpenAI