Using GPT-4 #156
Using GPT-4
#156
-
|
Hi! Thanks for putting together such a great library. I am testing pandasai on a google collar notebook. How can I switch between the currently supported models? For example, I'd like to try gpt-4. Thanks! |
Beta Was this translation helpful? Give feedback.
Answered by
mspronesti
May 22, 2023
Replies: 1 comment 2 replies
-
|
just set the from pandasai import PandasAI
from pandasai.llm import OpenAI
llm = OpenAI(api_key='YOUR_KEY_HERE', model='gpt-4')
pandas_ai = PandasAI(llm, conversational=False)
pandas_ai(df, prompt='YOUR_PROMPT_HERE')if you use Hope this helps! If it does, please accept my answer 😄 |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
wenger9
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
just set the
modelparameter in theOpenAIclass when instiating it, e.g.if you use
AzureOpenAIjust create a deployment of GPT-4 and setdeployment_nameto the deployment name.Hope this helps! If it does, please accept my answer 😄