Skip to content

Commit

Permalink
chore: fix leftover of local file
Browse files Browse the repository at this point in the history
  • Loading branch information
gventuri committed Jun 19, 2024
1 parent 1878b35 commit 7381370
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
12 changes: 2 additions & 10 deletions docs/judge-agent.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,20 @@ JudgeAgent can be used both as a standalone agent and in conjunction with other
```python
import os

import pandas as pd

from pandasai.agent.agent import Agent
from pandasai.ee.agents.judge_agent import JudgeAgent

os.environ["PANDASAI_API_KEY"] = "$2a****************************"

github_stars = pd.read_csv("/Users/arslan/Downloads/stars (2).csv")

judge = JudgeAgent()
agent = Agent([github_stars], judge=judge)
agent = Agent('github-stars.csv', judge=judge)

print(agent.chat("return total stars count"))
```

### Using as a standalone

```python
import os

import pandas as pd

from pandasai.ee.agents.judge_agent import JudgeAgent
from pandasai.llm.openai import OpenAI

Expand All @@ -61,4 +53,4 @@ judge_agent.evaluate(
)
```

Judge Agent integration with other agents also gives the flexibility to use different LLM's
Judge Agent integration with other agents also gives the flexibility to use different LLMs.
6 changes: 1 addition & 5 deletions examples/judge_agent.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
import os

import pandas as pd

from pandasai.agent.agent import Agent
from pandasai.ee.agents.judge_agent import JudgeAgent
from pandasai.llm.openai import OpenAI

os.environ["PANDASAI_API_KEY"] = "$2a****************************"

github_stars = pd.read_csv("/Users/arslan/Downloads/stars (2).csv")

judge = JudgeAgent()
agent = Agent([github_stars], judge=judge)
agent = Agent("github-stars.csv", judge=judge)

print(agent.chat("return total stars count"))

Expand Down

0 comments on commit 7381370

Please sign in to comment.