Giter Site home page Giter Site logo

Comments (6)

gDanzel avatar gDanzel commented on June 16, 2024 1

Guess you should add a vectorstore in agent, like this:

self.smart_df=Agent(connector, config={"llm": self.pandasai,"open_charts":False,
                                                            "save_charts_path":self.temp_folder_pics,
                                                            "save_charts":True,"enable_cache": False,
                                                            "verbose":True},memory_size=3, vectorstore=BambooVectorStore(api_key="xxx")
                            )

from pandas-ai.

dudesparsh avatar dudesparsh commented on June 16, 2024

Hi @epicvhbennetts, can you please be more specific about which example are you trying? If you can provide more information about the same, it would be great. It would help us understand your query and replicate the issue.

Thanks,
Sparsh

from pandas-ai.

epicvhbennetts avatar epicvhbennetts commented on June 16, 2024

Hi dudesparsh.
thanks for replying to my question. Sure, what additional information can I provide you?. Here are a couple of things that could be useful.

I am not doing anything different than what is shown in the documentation. Here is a snippet of my code where I create the agent and add a line to "train"

connector = PandasConnector(PandasConnectorConfig(original_df=self.data_numerical), field_descriptions=ids.FIELD_DESCRIPTIONS)

self.smart_df=Agent(connector, config={"llm": self.pandasai,"open_charts":False,
                                                            "save_charts_path":self.temp_folder_pics,
                                                            "save_charts":True,"enable_cache": False,
                                                            "verbose":True},memory_size=3
                            )


self.smart_df.train(docs="The fiscal year starts in April")

Just when the train instruction is being executed, the code crashes with the error message I showed you before

Let me know if you need some additional info

Thanks in advance

from pandas-ai.

dudesparsh avatar dudesparsh commented on June 16, 2024

@gDanzel thanks for that, I also believe that should work.

@gventuri , Many individuals seem to encounter similar challenges, likely due to a lack of familiarity with configuring PandasAI, especially among agents. Could we consider incorporating a dedicated section addressing configurations in our documentation or enhancing the existing documentation?

from pandas-ai.

gventuri avatar gventuri commented on June 16, 2024

@epicvhbennetts as @gDanzel you can fix it by passing the vector store or by setting the env variable.
@dudesparsh great point, added a troubleshooting section in the docs: https://docs.pandas-ai.com/en/latest/train/#train-with-your-own-settings

from pandas-ai.

flashtheman avatar flashtheman commented on June 16, 2024

It works when I set a dummy pandas ai api key. But this should not be necessary. This line solves the problem, although I just use "YOUR_PANDASAIAPI_KEY":

os.environ["PANDASAI_API_KEY"] = "YOUR_PANDASAIAPI_KEY"

from pandas-ai.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.