Skip to content

Commit

Permalink
clarified API key instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
emcf committed Sep 1, 2024
1 parent 4fa3d16 commit 3212879
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,17 @@ pip install thepipe-api

### Hosted API (Python)

You can get an API key by signing up for a free account at [thepi.pe](https://thepi.pe). The, simply set the `THEPIPE_API_KEY` environment variable to your API key.

```python
from thepipe.scraper import scrape_file
from thepipe.core import chunks_to_messages
from openai import OpenAI

# scrape markdown, tables, visuals
chunks = scrape_file(filepath="paper.pdf", ai_extraction=True)
# scrape clean markdown
chunks = scrape_file(filepath="paper.pdf", ai_extraction=False)

# call LLM with clean, comprehensive data
# call LLM with scraped chunks
client = OpenAI()
response = client.chat.completions.create(
model="gpt-4o",
Expand Down

0 comments on commit 3212879

Please sign in to comment.