@openserp/sdk 0.1.0 → 0.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 +2 -33
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -212,44 +212,13 @@ const client = new OpenSERP({
|
|
|
212
212
|
});
|
|
213
213
|
```
|
|
214
214
|
|
|
215
|
-
## Edge runtimes
|
|
216
|
-
|
|
217
|
-
The SDK uses global `fetch` and has no Node-only runtime dependency. It runs on Node, Bun, Deno, Cloudflare Workers, and Vercel Edge.
|
|
218
|
-
|
|
219
|
-
Cloudflare Workers:
|
|
220
|
-
|
|
221
|
-
```ts
|
|
222
|
-
import { OpenSERP } from "@openserp/sdk";
|
|
223
|
-
|
|
224
|
-
export default {
|
|
225
|
-
async fetch(_request: Request, env: { OPENSERP_KEY: string }) {
|
|
226
|
-
const client = new OpenSERP({ apiKey: env.OPENSERP_KEY });
|
|
227
|
-
const results = await client.fastSearch({ text: "openserp" });
|
|
228
|
-
return Response.json(results);
|
|
229
|
-
},
|
|
230
|
-
};
|
|
231
|
-
```
|
|
232
|
-
|
|
233
|
-
Vercel Edge:
|
|
234
|
-
|
|
235
|
-
```ts
|
|
236
|
-
import { OpenSERP } from "@openserp/sdk";
|
|
237
|
-
|
|
238
|
-
export const runtime = "edge";
|
|
239
|
-
|
|
240
|
-
export async function GET() {
|
|
241
|
-
const client = new OpenSERP({ apiKey: process.env.OPENSERP_KEY });
|
|
242
|
-
return Response.json(await client.search({ engine: "google", text: "openserp" }));
|
|
243
|
-
}
|
|
244
|
-
```
|
|
245
|
-
|
|
246
215
|
## Use cases
|
|
247
216
|
|
|
248
217
|
- **AI grounding / RAG** — feed top-N search results into an LLM prompt (OpenAI, Anthropic, Ollama) for up-to-date answers.
|
|
249
|
-
- **LLM tool use** — expose `client.search` as a tool to your agent
|
|
218
|
+
- **LLM tool use** — expose `client.search` as a tool to your agent.
|
|
250
219
|
- **SEO monitoring** — daily rank tracking across multiple engines and regions, export to Sheets or Notion.
|
|
251
220
|
- **Competitor analysis** — weekly diff of top-10 results for a keyword set.
|
|
252
|
-
- **Automations**
|
|
221
|
+
- **Automations**
|
|
253
222
|
- **Data pipelines** — stream SERPs to ClickHouse, BigQuery, or a DataFrame for NLP on snippets.
|
|
254
223
|
|
|
255
224
|
## Development
|