Skip to content

Commit d00e631

Browse files
committed
docs: improve README examples readability
1 parent 562883b commit d00e631

File tree

1 file changed

+41
-29
lines changed

1 file changed

+41
-29
lines changed

README.md

Lines changed: 41 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -103,18 +103,22 @@ search_response: Any = client.search(
103103
)
104104
assert isinstance(search_response, LinkupSourcedAnswer)
105105
print(search_response.model_dump())
106-
# Response:
107-
# {
108-
# answer="The three major events in the life of Abraham Lincoln are: 1. ...",
109-
# sources=[
110-
# {
111-
# "name": "HISTORY",
112-
# "url": "https://www.history.com/topics/us-presidents/abraham-lincoln",
113-
# "snippet": "Abraham Lincoln - Facts & Summary - HISTORY ..."
114-
# },
115-
# ...
116-
# ]
117-
# }
106+
```
107+
108+
Which prints:
109+
110+
```bash
111+
{
112+
answer="The three major events in the life of Abraham Lincoln are: 1. ...",
113+
sources=[
114+
{
115+
"name": "HISTORY",
116+
"url": "https://www.history.com/topics/us-presidents/abraham-lincoln",
117+
"snippet": "Abraham Lincoln - Facts & Summary - HISTORY ..."
118+
},
119+
...
120+
]
121+
}
118122
```
119123

120124
Check the code or the
@@ -139,11 +143,15 @@ fetch_response: LinkupFetchResponse = client.fetch(
139143
include_raw_html=True,
140144
)
141145
print(fetch_response.model_dump())
142-
# Response:
143-
# {
144-
# markdown="Get started for free, no credit card required...",
145-
# raw_html="<!DOCTYPE html><html lang=\"en\"><head>...</head><body>...</body></html>"
146-
# }
146+
```
147+
148+
Which prints:
149+
150+
```bash
151+
{
152+
markdown="Get started for free, no credit card required...",
153+
raw_html="<!DOCTYPE html><html lang=\"en\"><head>...</head><body>...</body></html>"
154+
}
147155
```
148156

149157
Check the code or the
@@ -175,18 +183,22 @@ async def main() -> None:
175183
print(search_response.model_dump())
176184

177185
asyncio.run(main())
178-
# Response:
179-
# {
180-
# answer="The three major events in the life of Abraham Lincoln are: 1. ...",
181-
# sources=[
182-
# {
183-
# "name": "HISTORY",
184-
# "url": "https://www.history.com/topics/us-presidents/abraham-lincoln",
185-
# "snippet": "Abraham Lincoln - Facts & Summary - HISTORY ..."
186-
# },
187-
# ...
188-
# ]
189-
# }
186+
```
187+
188+
Which prints:
189+
190+
```bash
191+
{
192+
answer="The three major events in the life of Abraham Lincoln are: 1. ...",
193+
sources=[
194+
{
195+
"name": "HISTORY",
196+
"url": "https://www.history.com/topics/us-presidents/abraham-lincoln",
197+
"snippet": "Abraham Lincoln - Facts & Summary - HISTORY ..."
198+
},
199+
...
200+
]
201+
}
190202
```
191203

192204
#### 📚 More Examples

0 commit comments

Comments
 (0)