Skip to content

Commit

Permalink
Merge branch 'master' into performance/planning
Browse files Browse the repository at this point in the history
  • Loading branch information
Pwuts authored Jul 14, 2023
2 parents 93e019f + c821b29 commit 3966cdf
Show file tree
Hide file tree
Showing 12 changed files with 76 additions and 6 deletions.
2 changes: 1 addition & 1 deletion autogpt/config/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ def check_openai_api_key(config: Config) -> None:
print(
Fore.GREEN
+ "OpenAI API key successfully set!\n"
+ Fore.ORANGE
+ Fore.YELLOW
+ "NOTE: The API key you've set is only temporary.\n"
+ "For longer sessions, please set it in .env file"
+ Fore.RESET
Expand Down
4 changes: 4 additions & 0 deletions autogpt/memory/vector/memory_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import json
from typing import Literal

import ftfy
import numpy as np

from autogpt.config import Config
Expand Down Expand Up @@ -43,6 +44,9 @@ def from_text(
):
logger.debug(f"Memorizing text:\n{'-'*32}\n{text}\n{'-'*32}\n")

# Fix encoding, e.g. removing unicode surrogates (see issue #778)
text = ftfy.fix_text(text)

chunks = [
chunk
for chunk, _ in (
Expand Down
6 changes: 5 additions & 1 deletion autogpt/workspace/workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,11 @@ def _sanitize_path(
logger.debug(f"Resolved root as '{root}'")

# Allow exception for absolute paths if they are contained in your workspace directory.
if relative_path.is_absolute() and not relative_path.is_relative_to(root):
if (
relative_path.is_absolute()
and restrict_to_root
and not relative_path.is_relative_to(root)
):
raise ValueError(
f"Attempted to access absolute path '{relative_path}' in workspace '{root}'."
)
Expand Down
Binary file added docs/imgs/e2b-dashboard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/imgs/e2b-log-url.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/imgs/e2b-new-tag.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/imgs/e2b-tag-button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
52 changes: 52 additions & 0 deletions docs/share-your-logs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
## Share your logs with us to help improve Auto-GPT

Do you notice weird behavior with your agent? Do you have an interesting use case? Do you have a bug you want to report?
Follow the steps below to enable your logs and upload them. You can include these logs when making an issue report or discussing an issue with us.

### Enable Debug Logs
Activity, Error, and Debug logs are located in `./logs`

To print out debug logs:

``` shell
./run.sh --debug # on Linux / macOS

.\run.bat --debug # on Windows

docker-compose run --rm auto-gpt --debug # in Docker
```

### Inspect and share logs
You can inspect and share logs via [e2b](https://e2b.dev).
![E2b logs dashboard](./imgs/e2b-dashboard.png)



1. Go to [autogpt.e2b.dev](https://autogpt.e2b.dev) and sign in.
2. You'll see logs from other members of the AutoGPT team that you can inspect.
3. Or you upload your own logs. Click on the "Upload log folder" button and select the debug logs dir that you generated. Wait a 1-2 seconds and the page reloads.
4. You can share logs via sharing the URL in your browser.
![E2b log URL](./imgs/e2b-log-url.png)


### Add tags to logs
You can add custom tags to logs for other members of your team. This is useful if you want to indicate that the agent is for example having issues with challenges.

E2b offers 3 types of severity:

- Success
- Warning
- Error

You can name your tag any way you want.

#### How to add a tag
1. Click on the "plus" button on the left from the logs folder name.

![E2b tag button](./imgs/e2b-tag-button.png)

2. Type the name of a new tag.

3. Select the severity.

![E2b new tag](./imgs/e2b-new-tag.png)
12 changes: 10 additions & 2 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,20 @@ This may give your bot increased intelligence.
## Logs
Activity and error logs are located in the `./output/logs`
Activity, Error, and Debug logs are located in `./logs`
!!! tip
Do you notice weird behavior with your agent? Do you have an interesting use case? Do you have a bug you want to report?
Follow the step below to enable your logs. You can include these logs when making an issue report or discussing an issue with us.
To print out debug logs:
``` shell
./run.sh --debug
./run.sh --debug # on Linux / macOS
.\run.bat --debug # on Windows
docker-compose run --rm auto-gpt --debug # in Docker
```
## Disabling Command Categories
Expand Down
3 changes: 2 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ nav:
- Voice: configuration/voice.md
- Image Generation: configuration/imagegen.md

- Contributing:
- Help us improve Auto-GPT:
- Share your debug logs with us: share-your-logs.md
- Contribution guide: contributing.md
- Running tests: testing.md
- Code of Conduct: code-of-conduct.md
Expand Down
2 changes: 1 addition & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
[build]
publish = "public/"
command = "mkdocs build -d public"
ignore = "git diff --quiet HEAD^ HEAD docs mkdocs.yml CONTRIBUTING.md CODE_OF_CONDUCT.md LICENSE"
ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF docs mkdocs.yml CONTRIBUTING.md CODE_OF_CONDUCT.md LICENSE"
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ google-api-python-client #(https://developers.google.com/custom-search/v1/overvi
pinecone-client==2.2.1
redis
orjson==3.8.10
ftfy>=6.1.1
Pillow
selenium==4.1.4
webdriver-manager
Expand Down

0 comments on commit 3966cdf

Please sign in to comment.