You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if prompt:
try:
result = pandas_ai.chat(prompt)
print(result)
except KeyError as e:
print(f"Error: {e}. Unable to retrieve result.")
else:
print("Please enter a prompt.")
Unfortunately, I was not able to answer your question, because of the following error:
GoogleGemini._generate_text() takes 2 positional arguments but 3 were given```
The text was updated successfully, but these errors were encountered:
System Info
OS: Windows 11
Python version: 3.10
The current version of pandasai being used: 2.0.2
馃悰 Describe the bug
Getting type error while using GoogleGemini but working fine with GooglePalm.
Read CSV file
import pandas as pd
from pandasai import SmartDataframe
from pandasai.llm.google_gemini import GoogleGemini
file_path = "D:\csv\dataset.csv"
df = pd.read_csv(file_path)
Prompt input
prompt = input("Enter your prompt: ")
Create LLM and PandasAI objects
llm = GoogleGemini(api_key=api_token)
pandas_ai = SmartDataframe(df, config={"llm": llm, "verbose": True})
Generate output based on the prompt
if prompt:
try:
result = pandas_ai.chat(prompt)
print(result)
except KeyError as e:
print(f"Error: {e}. Unable to retrieve result.")
else:
print("Please enter a prompt.")
The text was updated successfully, but these errors were encountered: