@goperigon/perigon-ts 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -161,6 +161,17 @@ const journalist = await perigon.getJournalistById({ id: results[0].id });
|
|
|
161
161
|
await perigon.searchStories({ q: "climate change", size: 5 });
|
|
162
162
|
```
|
|
163
163
|
|
|
164
|
+
### Wikipedia – search Wikipedia pages (`/v1/wikipedia`)<br>
|
|
165
|
+
|
|
166
|
+
**Docs →** <https://docs.perigon.io/docs/wikipedia-endpoint>
|
|
167
|
+
|
|
168
|
+
```ts
|
|
169
|
+
const { pages } = await perigon.searchWikipedia({
|
|
170
|
+
q: "artificial intelligence",
|
|
171
|
+
size: 5,
|
|
172
|
+
});
|
|
173
|
+
```
|
|
174
|
+
|
|
164
175
|
### Vector search – semantic retrieval (`/v1/vector`)<br>
|
|
165
176
|
|
|
166
177
|
**Docs →** <https://docs.perigon.io/docs/vector-endpoint>
|
|
@@ -174,6 +185,19 @@ await perigon.vectorSearchArticles({
|
|
|
174
185
|
});
|
|
175
186
|
```
|
|
176
187
|
|
|
188
|
+
### Wikipedia vector search – semantic Wikipedia retrieval (`/v1/vector/wikipedia`)<br>
|
|
189
|
+
|
|
190
|
+
**Docs →** <https://docs.perigon.io/docs/vector-endpoint>
|
|
191
|
+
|
|
192
|
+
```ts
|
|
193
|
+
await perigon.vectorSearchWikipedia({
|
|
194
|
+
wikipediaSearchParams: {
|
|
195
|
+
prompt: "quantum computing breakthroughs",
|
|
196
|
+
size: 5,
|
|
197
|
+
},
|
|
198
|
+
});
|
|
199
|
+
```
|
|
200
|
+
|
|
177
201
|
### Summarizer – generate an instant summary (`/v1/summarizer`)<br>
|
|
178
202
|
|
|
179
203
|
**Docs →** <https://docs.perigon.io/docs/search-summarizer>
|
|
@@ -194,14 +218,16 @@ console.log(summary);
|
|
|
194
218
|
await perigon.searchTopics({ size: 10 });
|
|
195
219
|
```
|
|
196
220
|
|
|
197
|
-
| Action | Code Example
|
|
198
|
-
| --------------------------------------- |
|
|
199
|
-
| Filter by source | `await perigon.searchArticles({ source: ['nytimes.com'] })`
|
|
200
|
-
| Limit by date range | `await perigon.searchArticles({ q: 'business', from: '2025‑04‑01', to: '2025‑04‑08' })`
|
|
201
|
-
| Company lookup | `await perigon.searchCompanies({ name: 'Apple', size: 5 })`
|
|
202
|
-
|
|
|
203
|
-
|
|
|
204
|
-
|
|
|
221
|
+
| Action | Code Example |
|
|
222
|
+
| --------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
|
|
223
|
+
| Filter by source | `await perigon.searchArticles({ source: ['nytimes.com'] })` |
|
|
224
|
+
| Limit by date range | `await perigon.searchArticles({ q: 'business', from: '2025‑04‑01', to: '2025‑04‑08' })` |
|
|
225
|
+
| Company lookup | `await perigon.searchCompanies({ name: 'Apple', size: 5 })` |
|
|
226
|
+
| Wikipedia page search | `await perigon.searchWikipedia({ q: 'machine learning', size: 5 })` |
|
|
227
|
+
| Summarize any query | `await perigon.searchSummarizer({ q: 'renewable energy', size: 20 })` |
|
|
228
|
+
| Semantic / vector search | `await perigon.vectorSearchArticles({ articleSearchParams: { prompt: 'advancements in AI', size: 5 }})` |
|
|
229
|
+
| Wikipedia semantic search | `await perigon.vectorSearchWikipedia({ wikipediaSearchParams: { prompt: 'quantum physics', size: 5 }})` |
|
|
230
|
+
| Retrieve available taxonomic **topics** | `await perigon.searchTopics({ size: 10 })` |
|
|
205
231
|
|
|
206
232
|
---
|
|
207
233
|
|