Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PANDAS API KEY needed (and used!!!) if agent.train is utilized #1120

Closed
flashtheman opened this issue Apr 17, 2024 · 3 comments
Closed

PANDAS API KEY needed (and used!!!) if agent.train is utilized #1120

flashtheman opened this issue Apr 17, 2024 · 3 comments

Comments

@flashtheman
Copy link

System Info

pandasai: v2.0.33
azure openai with gpt-4, api version 2024-02-01

🐛 Describe the bug

I defined the pandas ai api key like this, because it seems there is a bug that requires it in combination with azure open ai api (I get "pandasai.exceptions.MissingVectorStoreError: No vector store provided. Please provide a vector store to train the agent". otherwise):
os.environ["PANDASAI_API_KEY"] = "xxx"

I refer to the llm, which is azure open ai:

agent = Agent(df, config={"llm": llm})

When I train, it writes back my training data to the pandabi saas service!!!!

agent.train(docs=query.instructions)

It also stores every request (every agent chat question) to the pandabi service for some reason. This is really dangerous. The llm is clearly defined as:

llm = AzureOpenAI(
    api_token=os.getenv("API_TOKEN"),
    azure_endpoint=os.getenv("ENDPOINT"),
    api_version="2024-02-01",
    deployment_name="gpt-4",
)
@ArslanSaleem
Copy link
Collaborator

@flashtheman PandasAI API key is necessary if you want to train

@flashtheman
Copy link
Author

@flashtheman PandasAI API key is necessary if you want to train

Yes, I see. But is that right? Is this part of the enterprise features? There is nothing in the docs about this. I thought only enterprise features and the Bamboo llm need the API key. It seems very confusing to me.

@gventuri
Copy link
Collaborator

gventuri commented Apr 19, 2024

@flashtheman that's a good point. We have updated the docs!

By default, it uses the BambooVectorstore (which relies on the free API token).
As an alternative, if you want to use local vector stores, they need an enterprise license for production.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants