diff --git a/README.md b/README.md index 2528c93..a64f079 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,8 @@ The smartest ape in the jungle Here is a handy python function that can help you take an entire repo and concatenate all files in a single .txt with all files contents and paths: ```python +import os + # Function to concatenate files into a single .txt file def concatenate_files(dir_name, output_filename): with open(output_filename, 'w', encoding='utf-8') as output_file: @@ -25,7 +27,7 @@ def concatenate_files(dir_name, output_filename): print(f"Skipping non-text file or error reading file: {file_path} - {e}") # Example Call -concatenate_files(dir_name, 'knowledge_base.txt') +concatenate_files('./folder_name', 'knowledge_base.txt') ``` ### 2. Set `OPENAI_API_KEY` and `TELEGRAM_TOKEN` environment variables.