hanxiao commited on
Commit
c2cd71d
·
unverified ·
1 Parent(s): 39a446f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +11 -15
README.md CHANGED
@@ -7,7 +7,7 @@ Reader converts any URL to an **LLM-friendly** input with a simple prefix `https
7
  - Live demo: https://jina.ai/reader
8
  - Or just visit these URLs https://r.jina.ai/https://github.com/jina-ai/reader, https://r.jina.ai/https://x.com/elonmusk and see yourself.
9
 
10
- > Feel free to use https://r.jina.ai/* in production. It is free, stable and scalable. We are maintaining it actively as one of the core products of Jina AI.
11
 
12
  <img width="973" alt="image" src="https://github.com/jina-ai/reader/assets/2041322/2067c7a2-c12e-4465-b107-9a16ca178d41">
13
 
@@ -19,21 +19,19 @@ Reader converts any URL to an **LLM-friendly** input with a simple prefix `https
19
 
20
  ## Usage
21
 
22
- ### Standard mode
23
-
24
  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:
25
 
26
- https://r.jina.ai/https://en.wikipedia.org/wiki/Artificial_intelligence
27
 
28
- ### Streaming Mode
29
 
30
- Streaming mode is useful when you find that the standard mode provides an incomplete result. This is because streaming mode will wait a bit longer until the page is fully rendered. Use the accept-header to toggle the streaming mode:
31
 
32
  ```bash
33
  curl -H "Accept: text/event-stream" https://r.jina.ai/https://en.m.wikipedia.org/wiki/Main_Page
34
  ```
35
 
36
- The data comes in a stream; each subsequent chunk contains more complete information. **The last chunk should provide the most complete and final result.**
37
 
38
  For example, compare these two curl commands below. You can see streaming one gives you complete information at last, whereas standard mode does not. This is because the content loading on this particular site is triggered by some js *after* the page is fully loaded, and standard mode returns the page "too soon".
39
  ```bash
@@ -58,13 +56,6 @@ Your LLM: LLM(streamContent1) | |
58
 
59
  Note that in terms of completeness: `... > streamContent3 > streamContent2 > streamContent1`, each subsequent chunk contains more complete information.
60
 
61
- ### JSON mode (super early beta)
62
-
63
- This is still very early and the result is not really a "useful" JSON. It contains three fields `url`, `title` and `content` only. Nonetheless, you can use accept-header to control the output format:
64
- ```bash
65
- curl -H "Accept: application/json" https://r.jina.ai/https://en.m.wikipedia.org/wiki/Main_Page
66
- ```
67
-
68
  ### Using request headers
69
 
70
  As you have already seen above, one can control the behavior of the Reader API using request headers. Here is a complete list of supported headers.
@@ -79,7 +70,12 @@ As you have already seen above, one can control the behavior of the Reader API u
79
  - You can specify a proxy server via the `x-proxy-url` header.
80
  - You can bypass the cached page (lifetime 300s) via the `x-no-cache` header.
81
 
82
-
 
 
 
 
 
83
 
84
  ## Install
85
 
 
7
  - Live demo: https://jina.ai/reader
8
  - Or just visit these URLs https://r.jina.ai/https://github.com/jina-ai/reader, https://r.jina.ai/https://x.com/elonmusk and see yourself.
9
 
10
+ > Feel free to use Reader API in production. It is free, stable and scalable. We are maintaining it actively as one of the core products of Jina AI.
11
 
12
  <img width="973" alt="image" src="https://github.com/jina-ai/reader/assets/2041322/2067c7a2-c12e-4465-b107-9a16ca178d41">
13
 
 
19
 
20
  ## Usage
21
 
 
 
22
  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:
23
 
24
+ [https://r.jina.ai/https://en.wikipedia.org/wiki/Artificial_intelligence](https://r.jina.ai/https://en.wikipedia.org/wiki/Artificial_intelligence)
25
 
26
+ ### Streaming mode
27
 
28
+ Streaming mode is useful when you find that the standard mode provides an incomplete result. This is because the Reader will wait a bit longer until the page is *stablely* rendered. Use the accept-header to toggle the streaming mode:
29
 
30
  ```bash
31
  curl -H "Accept: text/event-stream" https://r.jina.ai/https://en.m.wikipedia.org/wiki/Main_Page
32
  ```
33
 
34
+ The data comes in a stream; each subsequent chunk contains more complete information. **The last chunk should provide the most complete and final result.** If you come from LLMs, please note that it is a different behavior than the LLMs' text-generation streaming.
35
 
36
  For example, compare these two curl commands below. You can see streaming one gives you complete information at last, whereas standard mode does not. This is because the content loading on this particular site is triggered by some js *after* the page is fully loaded, and standard mode returns the page "too soon".
37
  ```bash
 
56
 
57
  Note that in terms of completeness: `... > streamContent3 > streamContent2 > streamContent1`, each subsequent chunk contains more complete information.
58
 
 
 
 
 
 
 
 
59
  ### Using request headers
60
 
61
  As you have already seen above, one can control the behavior of the Reader API using request headers. Here is a complete list of supported headers.
 
70
  - You can specify a proxy server via the `x-proxy-url` header.
71
  - You can bypass the cached page (lifetime 300s) via the `x-no-cache` header.
72
 
73
+ ### JSON mode (super early beta)
74
+
75
+ This is still very early and the result is not really a "useful" JSON. It contains three fields `url`, `title` and `content` only. Nonetheless, you can use accept-header to control the output format:
76
+ ```bash
77
+ curl -H "Accept: application/json" https://r.jina.ai/https://en.m.wikipedia.org/wiki/Main_Page
78
+ ```
79
 
80
  ## Install
81