@posthog/ai 8.10.0 → 8.10.2
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/dist/adk/index.cjs +908 -1198
- package/dist/adk/index.cjs.map +1 -1
- package/dist/adk/index.d.ts +109 -109
- package/dist/adk/index.mjs +907 -1196
- package/dist/adk/index.mjs.map +1 -1
- package/dist/anthropic/index.cjs +927 -1111
- package/dist/anthropic/index.cjs.map +1 -1
- package/dist/anthropic/index.d.ts +34 -33
- package/dist/anthropic/index.mjs +899 -1102
- package/dist/anthropic/index.mjs.map +1 -1
- package/dist/gemini/index.cjs +863 -1108
- package/dist/gemini/index.cjs.map +1 -1
- package/dist/gemini/index.d.ts +38 -35
- package/dist/gemini/index.mjs +858 -1103
- package/dist/gemini/index.mjs.map +1 -1
- package/dist/index.cjs +1218 -1546
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +170 -163
- package/dist/index.mjs +1216 -1544
- package/dist/index.mjs.map +1 -1
- package/dist/langchain/index.cjs +851 -1029
- package/dist/langchain/index.cjs.map +1 -1
- package/dist/langchain/index.d.ts +75 -75
- package/dist/langchain/index.mjs +850 -1027
- package/dist/langchain/index.mjs.map +1 -1
- package/dist/langchain/middleware/index.cjs +1016 -1225
- package/dist/langchain/middleware/index.cjs.map +1 -1
- package/dist/langchain/middleware/index.d.ts +29 -25
- package/dist/langchain/middleware/index.mjs +1015 -1223
- package/dist/langchain/middleware/index.mjs.map +1 -1
- package/dist/openai/index.cjs +1990 -2523
- package/dist/openai/index.cjs.map +1 -1
- package/dist/openai/index.d.ts +106 -104
- package/dist/openai/index.mjs +1985 -2518
- package/dist/openai/index.mjs.map +1 -1
- package/dist/openai-agents/index.cjs +745 -827
- package/dist/openai-agents/index.cjs.map +1 -1
- package/dist/openai-agents/index.d.ts +48 -47
- package/dist/openai-agents/index.mjs +744 -825
- package/dist/openai-agents/index.mjs.map +1 -1
- package/dist/otel/index.cjs +427 -486
- package/dist/otel/index.cjs.map +1 -1
- package/dist/otel/index.d.ts +36 -35
- package/dist/otel/index.mjs +426 -484
- package/dist/otel/index.mjs.map +1 -1
- package/dist/vercel/index.cjs +992 -1343
- package/dist/vercel/index.cjs.map +1 -1
- package/dist/vercel/index.d.ts +21 -16
- package/dist/vercel/index.mjs +991 -1341
- package/dist/vercel/index.mjs.map +1 -1
- package/package.json +15 -14
package/dist/vercel/index.d.ts
CHANGED
|
@@ -1,27 +1,32 @@
|
|
|
1
|
-
import { LanguageModelV2, LanguageModelV3 } from
|
|
2
|
-
import { PostHog } from
|
|
3
|
-
|
|
1
|
+
import { LanguageModelV2, LanguageModelV3 } from "@ai-sdk/provider";
|
|
2
|
+
import { PostHog } from "posthog-node";
|
|
3
|
+
import "openai";
|
|
4
|
+
import "@anthropic-ai/sdk";
|
|
5
|
+
import "openai/lib/ResponsesParser";
|
|
6
|
+
//#region src/utils.d.ts
|
|
4
7
|
interface CostOverride {
|
|
5
|
-
|
|
6
|
-
|
|
8
|
+
inputCost: number;
|
|
9
|
+
outputCost: number;
|
|
7
10
|
}
|
|
8
|
-
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region src/vercel/middleware.d.ts
|
|
9
13
|
type LanguageModel = LanguageModelV2 | LanguageModelV3;
|
|
10
14
|
interface ClientOptions {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
posthogDistinctId?: string;
|
|
16
|
+
posthogTraceId?: string;
|
|
17
|
+
posthogProperties?: Record<string, any>;
|
|
18
|
+
posthogPrivacyMode?: boolean;
|
|
19
|
+
posthogGroups?: Record<string, any>;
|
|
20
|
+
posthogModelOverride?: string;
|
|
21
|
+
posthogProviderOverride?: string;
|
|
22
|
+
posthogCostOverride?: CostOverride;
|
|
23
|
+
posthogCaptureImmediate?: boolean;
|
|
20
24
|
}
|
|
21
25
|
/**
|
|
22
26
|
* Wraps a Vercel AI SDK language model (V2 or V3) with PostHog tracing.
|
|
23
27
|
* Automatically detects the model version and applies appropriate instrumentation.
|
|
24
28
|
*/
|
|
25
29
|
declare const wrapVercelLanguageModel: <T extends LanguageModel>(model: T, phClient: PostHog, options: ClientOptions) => T;
|
|
26
|
-
|
|
30
|
+
//#endregion
|
|
27
31
|
export { wrapVercelLanguageModel as withTracing };
|
|
32
|
+
//# sourceMappingURL=index.d.ts.map
|