Closed KEAI404 closed 3 months ago
@KEAI404 Hello, I am facing the same issue. The name and description are not getting passed and showing null in the pandasai.logs file.
did you find the solution or has any other method worked for you?
@SweetyKhut can you share the code that you are using?
@gventuri Yes this is the tutorial code which i am using
import pandas as pd from pandasai.connectors import PandasConnector from pandasai import SmartDataframe,SmartDatalake from pandasai.llm import OpenAI
llm = OpenAI(api_token="###")
users_df = pd.DataFrame( { "id": [1, 2, 3, 4, 5], "name": ["John", "Emma", "Liam", "Olivia", "William"] } ) users = SmartDataframe(users_df, name="users", description="Lorem ipsum",config={"llm": llm})
photos_df = pd.DataFrame( { "id": [31, 32, 33, 34, 35], "user_id": [1, 1, 2, 4, 5] } ) photos = SmartDataframe(photos_df, name="photos", description="Lorem ipsum",config={"llm": llm})
lake = SmartDatalake([users, photos], config={"llm": llm}) print(lake.chat("How many photos has been uploaded by Emma?")) print(lake.last_code_executed)
I also tried for with only smartdataframe like this
df = SmartDataframe(df, name="My DataFrame", description="Brief description of what the dataframe contains")
but still getting passed as null
@SweetyKhut Unfortunately, several methods have been tried without success.
System Info
pandasai:2.0.19 python:3.10.12
🐛 Describe the bug
I set name and description, but found that the name and description were still null in the prompt.
df = SmartDataframe(df, name="data name xxx", description="include xxx ", config={"llm": lm_studio_llm} ) response = df.chat("Which country has the highest gdp?")