reader/README.md

35 lines
1017 B
Markdown
Raw Normal View History

2024-04-14 02:42:15 +08:00
# Reader
2024-04-10 19:32:07 +08:00
2024-04-14 02:42:15 +08:00
Convert any URL to an LLM-friendly input with a simple prefix `https://r.jina.ai/`. Get improved output for your agent and RAG systems at no cost. Find more at https://jina.ai/reader.
2024-04-10 19:32:07 +08:00
2024-04-14 02:42:15 +08:00
## Usage
2024-04-10 19:32:07 +08:00
2024-04-14 02:42:15 +08:00
To use the Reader, simply prepend `https://r.jina.ai/` to any URL. For example, to convert the URL `https://en.wikipedia.org/wiki/Artificial_intelligence` to an LLM-friendly input, use the following URL:
2024-04-10 19:32:07 +08:00
```bash
2024-04-14 02:42:15 +08:00
https://r.jina.ai/https://en.wikipedia.org/wiki/Artificial_intelligence
2024-04-10 19:32:07 +08:00
```
2024-04-14 02:42:15 +08:00
### Streaming
2024-04-10 19:32:07 +08:00
2024-04-14 02:42:15 +08:00
Use accept-header to control the streaming behavior:
2024-04-10 19:32:07 +08:00
```bash
2024-04-14 02:42:15 +08:00
curl -H "Accept: text/event-stream" https://r.jina.ai/https://en.m.wikipedia.org/wiki/Main_Page
2024-04-10 19:32:07 +08:00
```
2024-04-14 02:42:15 +08:00
## Install
2024-04-10 19:32:07 +08:00
2024-04-14 02:42:15 +08:00
You will need the following tools to run the project:
- Node v18 (The build fails for Node version >18)
- Firebase CLI (`npm install -g firebase-tools`)
2024-04-10 19:32:07 +08:00
2024-04-14 02:42:15 +08:00
For backend, go to the `backend/functions` directory and install the npm dependencies.
2024-04-10 19:32:07 +08:00
```bash
2024-04-14 02:42:15 +08:00
git clone git@github.com:jina-ai/reader.git
cd backend/functions
npm install
2024-04-10 19:32:07 +08:00
```