Skip to content

Commit

Permalink
Minor improvements to the docs for voice config and testing (Signific…
Browse files Browse the repository at this point in the history
  • Loading branch information
Pwuts authored Apr 27, 2023
1 parent 7a161cc commit 9e17a30
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
17 changes: 12 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,22 @@ https://github.com/Significant-Gravitas/Auto-GPT/pulls?q=is%3Apr+is%3Aopen+-labe
## Testing your changes

If you add or change code, make sure the updated code is covered by tests.

To increase coverage if necessary, [write tests using `pytest`].
To increase coverage if necessary, [write tests using pytest].

For more info on running tests, please refer to ["Running tests"](https://significant-gravitas.github.io/Auto-GPT/testing/).

[write tests using `pytest`]: https://realpython.com/pytest-python-testing/
[write tests using pytest]: https://realpython.com/pytest-python-testing/

### API-dependent tests

To run tests that involve making calls to the OpenAI API, we use VCRpy. It caches known
requests and matching responses in so-called *cassettes*, allowing us to run the tests
in CI without needing actual API access.

When changes cause a test prompt to be generated differently, it will likely miss the
cache and make a request to the API, updating the cassette with the new request+response.
*Be sure to include the updated cassette in your PR!*


In Pytest, we use VCRpy. It's a package that allows us to save OpenAI and other API providers' responses.
When you run Pytest locally:

- If no prompt change: you will not consume API tokens because there are no new OpenAI calls required.
Expand Down
4 changes: 2 additions & 2 deletions docs/configuration/voice.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ premade voices that Auto-GPT can use for speech.

1. Go to [ElevenLabs](https://beta.elevenlabs.io/) and make an account if you don't
already have one.
2. Choose and setup the `Starter` plan.
3. Click the top right icon and find "Profile" to locate your API Key.
2. Choose and setup the *Starter* plan.
3. Click the top right icon and find *Profile* to locate your API Key.

In the `.env` file set:

Expand Down
5 changes: 1 addition & 4 deletions docs/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Get your OpenAI API key from: [https://platform.openai.com/account/api-keys](htt
!!! important
Make sure you have [Git](https://git-scm.com/downloads) installed for your OS.

!!! info
!!! info "Executing commands"
To execute the given commands, open a CMD, Bash, or Powershell window.
On Windows: press ++win+x++ and pick *Terminal*, or ++win+r++ and enter `cmd`

Expand Down Expand Up @@ -115,9 +115,6 @@ Get your OpenAI API key from: [https://platform.openai.com/account/api-keys](htt

7. Save and close the `.env` file.

!!! info
Get your ElevenLabs API key from: [ElevenLabs](https://elevenlabs.io). You can view your xi-api-key using the "Profile" tab on the website.

!!! info "Using a GPT Azure-instance"
If you want to use GPT on an Azure instance, set `USE_AZURE` to `True` and
make an Azure configuration file:
Expand Down

0 comments on commit 9e17a30

Please sign in to comment.