Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
CosmosShadow committed Jun 28, 2024
1 parent 40ecbb0 commit d7cb8f5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,18 @@ See more in [test/test.py](test/test.py)

## API

parse_pdf(pdf_path, output_dir='./', api_key=None, base_url=None, model='gpt-4o', verbose=False)
**parse_pdf**(pdf_path, output_dir='./', api_key=None, base_url=None, model='gpt-4o', verbose=False)

parse pdf file to markdown file, and return markdown content and all image paths.

**pdf_path**: pdf file path
- **pdf_path**: pdf file path

**output_dir**: output directory. store all images and markdown file
- **output_dir**: output directory. store all images and markdown file

**api_key**: OpenAI API Key (optional). If not provided, Use OPENAI_API_KEY environment variable.
- **api_key**: OpenAI API Key (optional). If not provided, Use OPENAI_API_KEY environment variable.

**base_url**: OpenAI Base URL. (optional). If not provided, Use OPENAI_BASE_URL environment variable.
- **base_url**: OpenAI Base URL. (optional). If not provided, Use OPENAI_BASE_URL environment variable.

**model**: OpenAI Vison LLM Model, default is 'gpt-4o'. You also can use qwen-vl-max
- **model**: OpenAI Vison LLM Model, default is 'gpt-4o'. You also can use qwen-vl-max

**verbose**: verbose mode
- **verbose**: verbose mode
2 changes: 2 additions & 0 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ print(content)

**parse_pdf**(pdf_path, output_dir='./', api_key=None, base_url=None, model='gpt-4o', verbose=False)

将 pdf 文件解析为 markdown 文件,并返回 markdown 内容和所有图片路径列表。

- **pdf_path**:pdf 文件路径

- **output_dir**:输出目录。存储所有图片和 markdown 文件
Expand Down

0 comments on commit d7cb8f5

Please sign in to comment.