diff --git a/README.md b/README.md index 7180efd5a..64afd4e06 100644 --- a/README.md +++ b/README.md @@ -147,12 +147,14 @@ You can follow these steps to generate a PageIndex tree from a PDF document. pip3 install --upgrade -r requirements.txt ``` -### 2. Set your OpenAI API key +### 2. Set your API key Create a `.env` file in the root directory and add your API key: ```bash -CHATGPT_API_KEY=your_openai_key_here +OPENAI_API_KEY=your_openai_key_here +# or +CHATGPT_API_KEY=your_openai_key_here # legacy, still supported ``` ### 3. Run PageIndex on your PDF @@ -189,7 +191,41 @@ python3 run_pageindex.py --md_path /path/to/your/document.md > Note: in this function, we use "#" to determine node heading and their levels. For example, "##" is level 2, "###" is level 3, etc. Make sure your markdown file is formatted correctly. If your Markdown file was converted from a PDF or HTML, we don't recommend using this function, since most existing conversion tools cannot preserve the original hierarchy. Instead, use our [PageIndex OCR](https://pageindex.ai/blog/ocr), which is designed to preserve the original hierarchy, to convert the PDF to a markdown file and then use this function. -