Sinaptik-AI / pandas-ai

Chat with your database (SQL, CSV, pandas, polars, mongodb, noSQL, etc). PandasAI makes data analysis conversational using LLMs (GPT 3.5 / 4, Anthropic, VertexAI) and RAG.
https://pandas-ai.com
Other
13.57k stars 1.32k forks source link

PandasAI stop working #1426

Open abgonzalez opened 2 weeks ago

abgonzalez commented 2 weeks ago

System Info

Windows 11 Python 3.11.4 pandasai 2.0.24

🐛 Describe the bug

I was using PandasAI, and it was working perfect. But , out of the blue it stops working, and it's not working anymore.

2024-11-06 15:19:26 [INFO] Question: You are a Frontend developer. You have a DataFrame 'df' that has been merged from multiple CSV files. The DataFrame has columns: price, area, bedrooms, bathrooms, stories, mainroad, guestroom, basement, hotwaterheating, airconditioning, parking, prefarea, furnishingstatus.. Generate the HTML code for a page with has this bar graph of average house price by number of bedrooms. Please, do not generate a image file. 2024-11-06 15:19:27 [INFO] Running PandasAI with azure-openai LLM... 2024-11-06 15:19:27 [INFO] Prompt ID: ed5b1ec5-1ed1-48d6-ac1c-c21cee70e987 2024-11-06 15:19:27 [INFO] Executing Pipeline: GenerateChatPipeline 2024-11-06 15:19:31 [INFO] Executing Step 0: ValidatePipelineInput 2024-11-06 15:19:31 [INFO] Executing Step 1: CacheLookup 2024-11-06 15:19:31 [INFO] Executing Step 2: PromptGeneration 2024-11-06 15:19:32 [ERROR] Pipeline failed on step 2: Training failed because of internal server error try again later!

llm = await initialize_openai()
dl = Agent(dataframes, config={"llm": llm, "enable_cache": False, "verbose": True}, memory_size=10)
# dl = SmartDatalake(dataframes, config={"llm": llm})
response = dl.chat(prompt)

And I am receiving all the time the same error:
pandasai.exceptions.PandasAIApiCallError: Training failed because of internal server error try again later!

Can it work if I install a old version of pandasAI or it's a problem on the server of PandasAI?

Can I install in local PandasAI and use in local?
dosubot[bot] commented 2 weeks ago

There are a few similar issues and discussions related to the internal server error you are experiencing with PandasAI:

  1. A closed issue titled "pandasai.exceptions.PandasAIApiCallError: Training failed because of internal server error try again later!" was resolved by a pull request that addressed the error by allowing queries without training data if fetching fails [1].

  2. An open discussion titled "Encountering Internal Server Error When Using PandasAI for Training" might provide additional insights or similar experiences from other users [2].

  3. Another open discussion titled "Connection problem" could also be relevant, as it deals with connection issues that might relate to server errors [3].

Regarding your question about running PandasAI locally, it is possible to configure PandasAI to run entirely offline or locally without relying on external servers. The documentation provides instructions for setting up a dockerized client-server architecture using Docker and Docker Compose, which allows you to perform data analysis locally [4].

If you are considering downgrading to an older version of PandasAI, it might help if the issue is specific to the current version. However, running it locally could be a more robust solution if the problem is related to server-side issues.

To continue talking to Dosu, mention @dosu.