@posthog/ai 8.17.0 → 8.17.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/dist/adk/index.cjs +1 -1
- package/dist/adk/index.mjs +1 -1
- package/dist/anthropic/index.cjs +16 -1
- package/dist/anthropic/index.cjs.map +1 -1
- package/dist/anthropic/index.mjs +16 -1
- package/dist/anthropic/index.mjs.map +1 -1
- package/dist/claude-agent-sdk/index.cjs +1 -1
- package/dist/claude-agent-sdk/index.mjs +1 -1
- package/dist/gemini/index.cjs +1 -1
- package/dist/gemini/index.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/langchain/index.cjs +1 -1
- package/dist/langchain/index.mjs +1 -1
- package/dist/langchain/middleware/index.cjs +1 -1
- package/dist/langchain/middleware/index.mjs +1 -1
- package/dist/openai/index.cjs +41 -1
- package/dist/openai/index.cjs.map +1 -1
- package/dist/openai/index.mjs +41 -1
- package/dist/openai/index.mjs.map +1 -1
- package/dist/openai-agents/index.cjs +1 -1
- package/dist/openai-agents/index.mjs +1 -1
- package/dist/vercel/index.cjs +1 -1
- package/dist/vercel/index.mjs +1 -1
- package/package.json +4 -4
package/dist/adk/index.cjs
CHANGED
|
@@ -3,7 +3,7 @@ let _google_adk = require("@google/adk");
|
|
|
3
3
|
let uuid = require("uuid");
|
|
4
4
|
let _posthog_core = require("@posthog/core");
|
|
5
5
|
//#region package.json
|
|
6
|
-
var version = "8.17.
|
|
6
|
+
var version = "8.17.1";
|
|
7
7
|
//#endregion
|
|
8
8
|
//#region src/typeGuards.ts
|
|
9
9
|
const isObject = (value) => {
|
package/dist/adk/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { BasePlugin } from "@google/adk";
|
|
|
2
2
|
import { v4 } from "uuid";
|
|
3
3
|
import { toJsonSafeValue, uuidv7 } from "@posthog/core";
|
|
4
4
|
//#region package.json
|
|
5
|
-
var version = "8.17.
|
|
5
|
+
var version = "8.17.1";
|
|
6
6
|
//#endregion
|
|
7
7
|
//#region src/typeGuards.ts
|
|
8
8
|
const isObject = (value) => {
|
package/dist/anthropic/index.cjs
CHANGED
|
@@ -415,7 +415,7 @@ function addDefaults(params) {
|
|
|
415
415
|
}
|
|
416
416
|
//#endregion
|
|
417
417
|
//#region package.json
|
|
418
|
-
var version = "8.17.
|
|
418
|
+
var version = "8.17.1";
|
|
419
419
|
//#endregion
|
|
420
420
|
//#region src/serializeError.ts
|
|
421
421
|
const DEFAULT_MAX_DEPTH = 3;
|
|
@@ -1226,6 +1226,21 @@ var WrappedMessages = class extends _anthropic_ai_sdk.default.Messages {
|
|
|
1226
1226
|
return stream2;
|
|
1227
1227
|
}
|
|
1228
1228
|
return value;
|
|
1229
|
+
}).catch(async (error) => {
|
|
1230
|
+
await captureAiGeneration(this.phClient, {
|
|
1231
|
+
...posthogParams,
|
|
1232
|
+
model: anthropicParams.model,
|
|
1233
|
+
provider: "anthropic",
|
|
1234
|
+
input: this.formatInputForPostHog(anthropicParams, posthogParams.privacyMode),
|
|
1235
|
+
output: [],
|
|
1236
|
+
latency: (Date.now() - startTime) / 1e3,
|
|
1237
|
+
baseURL: this.baseURL,
|
|
1238
|
+
modelParameters: getModelParams(body),
|
|
1239
|
+
httpStatus: error?.status ? error.status : 500,
|
|
1240
|
+
usage: {},
|
|
1241
|
+
error
|
|
1242
|
+
});
|
|
1243
|
+
throw error;
|
|
1229
1244
|
}), {
|
|
1230
1245
|
requestIdHeader: "request-id",
|
|
1231
1246
|
workspaceIdHeader: "anthropic-workspace-id"
|