@breadcrumb-sdk/ai-sdk 0.0.3 → 0.0.4

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.
Files changed (2) hide show
  1. package/README.md +10 -2
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # @breadcrumb-sdk/ai-sdk
2
2
 
3
- Trace Vercel AI SDK calls with Breadcrumb. Pass `experimental_telemetry` to any `generateText`, `streamText`, or `generateObject` call and it shows up in your dashboard automatically.
3
+ Trace Vercel AI SDK calls with Breadcrumb. **[Documentation](https://breadcrumb.sh/docs)**
4
+
5
+ Pass `experimental_telemetry` to any `generateText`, `streamText`, or `generateObject` call and it shows up in your dashboard automatically.
4
6
 
5
7
  ## Install
6
8
 
@@ -16,7 +18,11 @@ import { initAiSdk } from "@breadcrumb-sdk/ai-sdk";
16
18
  import { generateText } from "ai";
17
19
  import { anthropic } from "@ai-sdk/anthropic";
18
20
 
19
- const bc = init({ apiKey: "bc_...", baseUrl: "https://your-breadcrumb-instance.com" });
21
+ const bc = init({
22
+ apiKey: "bc_...",
23
+ baseUrl: "https://your-breadcrumb-instance.com",
24
+ environment: "production",
25
+ });
20
26
  const { telemetry } = initAiSdk(bc);
21
27
 
22
28
  const { text } = await generateText({
@@ -28,6 +34,8 @@ const { text } = await generateText({
28
34
 
29
35
  Each call with `telemetry()` shows up as its own trace in the dashboard. No other setup needed.
30
36
 
37
+ Set `environment` on `init()` if you want AI SDK traces tagged as `"production"`, `"staging"`, `"development"`, and so on for environment filtering.
38
+
31
39
  ## Grouping calls into one trace
32
40
 
33
41
  If you want multiple calls to appear under a single trace, wrap them in `bc.trace()`:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breadcrumb-sdk/ai-sdk",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"