Skip to content

Commit

Permalink
feat(Sandbox): typo and update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ArslanSaleem committed Jan 24, 2025
1 parent 1806976 commit 878f325
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
18 changes: 12 additions & 6 deletions docs/v3/agent.mdx
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
---
title: 'Agent'
description: 'Add few-shot learning to your PandaAI agent'
title: "Agent"
description: "Add few-shot learning to your PandaAI agent"
---

<Note title="Beta Notice">
Release v3 is currently in beta. This documentation reflects the features and functionality in progress and may change before the final release.
Release v3 is currently in beta. This documentation reflects the features and
functionality in progress and may change before the final release.
</Note>

You can train PandaAI to understand your data better and to improve its performance. Training is as easy as calling the `train` method on the `Agent`.


## Prerequisites

Before you start training PandaAI, you need to set your PandaAI API key.
Before you start training PandaAI, you need to set your PandaAI API key.
You can generate your API key by signing up at [https://app.pandabi.ai](https://app.pandabi.ai).

```python
Expand Down Expand Up @@ -140,6 +140,8 @@ To enhance security and protect against malicious code through prompt injection,

### Installation

Before using the sandbox, you need to install Docker on your machine and ensure it is running.

First, install the sandbox package:

```bash
Expand Down Expand Up @@ -181,7 +183,9 @@ sandbox = DockerSandbox(
```

<Note>
The sandbox works offline and provides an additional layer of security for code execution. It's particularly useful when working with untrusted data or when you need to ensure that code execution is isolated from your main system.
The sandbox works offline and provides an additional layer of security for
code execution. It's particularly useful when working with untrusted data or
when you need to ensure that code execution is isolated from your main system.
</Note>

## Troubleshooting
Expand All @@ -203,9 +207,11 @@ vector_store = BambooVectorStor(api_key="YOUR_PANDABI_API_KEY")
# Instantiate the agent with the custom vector store
agent = Agent(connector, config={...} vectorstore=vector_store)
```

## Custom Head

In some cases, you might want to provide custom data samples to the conversational agent to improve its understanding and responses. For example, you might want to:

- Provide better examples that represent your data patterns
- Avoid sharing sensitive information
- Guide the agent with specific data scenarios
Expand Down
2 changes: 1 addition & 1 deletion extensions/sandbox/docker/pandasai_docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM python:3.9

LABEL image_name="pandaai-sandbox"
LABEL image_name="pandasai-sandbox"

# Install required Python packages
RUN pip install pandas numpy matplotlib
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@


class DockerSandbox(Sandbox):
def __init__(self, image_name="pandaai-sandbox", dockerfile_path=None):
def __init__(self, image_name="pandasai-sandbox", dockerfile_path=None):
super().__init__()
self._dockerfile_path: str = dockerfile_path or os.path.join(
os.path.dirname(__file__), "Dockerfile"
Expand Down

0 comments on commit 878f325

Please sign in to comment.