Sinaptik-AI/pandas-ai

Is that a must to use the Docker component if I am using the agent function?

Opened this issue ยท 5 comments

System Info

What's the need of the docker if i am not relying on the front hand? / doesn't need the front end.

๐Ÿ› Describe the bug

I am using my openAI model is there a need to spin up the docker?

No, it is not necessary to use the Docker component if you are using the agent function and do not need a front end. You can use the Agent class directly in Python without any mention of Docker or a front end [1].

To continue talking to Dosu, mention @dosu.

The error SSLCertVerificationError indicates that the SSL certificate verification failed due to a self-signed certificate in the certificate chain when trying to connect to api.domer.ai. This typically happens when the server's SSL certificate is not trusted by the client.

To resolve this, you can bypass SSL verification by setting verify=False in your requests. Here is an example of how to do this using the requests library:

import os
import requests
from pandasai import Agent

# Disable SSL warnings
requests.packages.urllib3.disable_warnings(requests.packages.urllib3.exceptions.InsecureRequestWarning)

# Set your API key
os.environ["PANDASAI_API_KEY"] = "YOUR_API_KEY"

# Create an Agent instance
agent = Agent("examples/data/Loan payments data.csv")

# Example of making a request with SSL verification disabled
response = requests.get('https://api.domer.ai', verify=False)

# Example #1: train the model with docs
agent.train(docs="Only return loans information about the past 10 years")

response = agent.chat("How many loans were paid off?")
print(response)

# Example #2: train the model with Q/A
query = "How many loans were paid off?"
code = """
import pandas as pd

df = dfs[0]
df['loan_status'].value_counts()
"""
agent.train(queries=[query], codes=[code])

response = agent.chat(query)
print(response)

Note: Disabling SSL verification is not recommended for production environments as it makes the connection insecure. It should only be used for testing purposes [1].

To continue talking to Dosu, mention @dosu.

No, using the agent.train() method in the pandas-ai library does not require Docker. You can use the agent.train() method directly in a Python script without any mention of Docker [1].

To continue talking to Dosu, mention @dosu.