diff --git a/README.md b/README.md index ae487ceb..f2ad74e5 100644 --- a/README.md +++ b/README.md @@ -115,7 +115,7 @@ cd Auto-GPT pip install -r requirements.txt ``` -5. Rename `.env.template` to `.env` and fill in your `OPENAI_API_KEY`. If you plan to use Speech Mode, fill in your `ELEVEN_LABS_API_KEY` as well. +5. Rename `.env.template` to `.env` and fill in your `OPENAI_API_KEY`. If you plan to use Speech Mode, fill in your `ELEVENLABS_API_KEY` as well. - See [OpenAI API Keys Configuration](#openai-api-keys-configuration) to obtain your OpenAI API key. - Obtain your ElevenLabs API key from: https://elevenlabs.io. You can view your xi-api-key using the "Profile" tab on the website. - If you want to use GPT on an Azure instance, set `USE_AZURE` to `True` and then follow these steps: @@ -334,8 +334,7 @@ To switch to either, change the `MEMORY_BACKEND` env variable to the value that ## 🧠 Memory pre-seeding -```bash -# python scripts/data_ingestion.py -h +# python autogpt/data_ingestion.py -h usage: data_ingestion.py [-h] (--file FILE | --dir DIR) [--init] [--overlap OVERLAP] [--max_length MAX_LENGTH] Ingest a file or a directory with multiple files into memory. Make sure to set your .env before running this script. @@ -348,10 +347,10 @@ options: --overlap OVERLAP The overlap size between chunks when ingesting files (default: 200) --max_length MAX_LENGTH The max_length of each chunk when ingesting files (default: 4000 -# python scripts/data_ingestion.py --dir seed_data --init --overlap 200 --max_length 1000 +# python autogpt/data_ingestion.py --dir seed_data --init --overlap 200 --max_length 1000 ``` -This script located at `scripts/data_ingestion.py`, allows you to ingest files into memory and pre-seed it before running Auto-GPT. +This script located at autogpt/data_ingestion.py, allows you to ingest files into memory and pre-seed it before running Auto-GPT. Memory pre-seeding is a technique that involves ingesting relevant documents or data into the AI's memory so that it can use this information to generate more informed and accurate responses. diff --git a/autogpt/json_fixes/auto_fix.py b/autogpt/json_fixes/auto_fix.py index 56664ba9..030e8aa7 100644 --- a/autogpt/json_fixes/auto_fix.py +++ b/autogpt/json_fixes/auto_fix.py @@ -21,13 +21,12 @@ def fix_json(json_string: str, schema: str) -> str: # Try to fix the JSON using GPT: function_string = "def fix_json(json_string: str, schema:str=None) -> str:" args = [f"'''{json_string}'''", f"'''{schema}'''"] - description_string = ( - "Fixes the provided JSON string to make it parseable" - " and fully compliant with the provided schema.\n If an object or" - " field specified in the schema isn't contained within the correct" - " JSON, it is omitted.\n This function is brilliant at guessing" - " when the format is incorrect." - ) + description_string = "This function takes a JSON string and ensures that it"\ + " is parseable and fully compliant with the provided schema. If an object"\ + " or field specified in the schema isn't contained within the correct JSON,"\ + " it is omitted. The function also escapes any double quotes within JSON"\ + " string values to ensure that they are valid. If the JSON string contains"\ + " any None or NaN values, they are replaced with null before being parsed." # If it doesn't already start with a "`", add one: if not json_string.startswith("`"):