@posthog/ai 8.16.3 → 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/README.md +8 -0
- 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/evaluations/index.cjs +2 -0
- package/dist/evaluations/index.cjs.map +1 -1
- package/dist/evaluations/index.d.ts +3 -0
- package/dist/evaluations/index.mjs +2 -0
- package/dist/evaluations/index.mjs.map +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 +3 -3
package/dist/anthropic/index.mjs
CHANGED
|
@@ -388,7 +388,7 @@ function addDefaults(params) {
|
|
|
388
388
|
}
|
|
389
389
|
//#endregion
|
|
390
390
|
//#region package.json
|
|
391
|
-
var version = "8.
|
|
391
|
+
var version = "8.17.1";
|
|
392
392
|
//#endregion
|
|
393
393
|
//#region src/serializeError.ts
|
|
394
394
|
const DEFAULT_MAX_DEPTH = 3;
|
|
@@ -1199,6 +1199,21 @@ var WrappedMessages = class extends AnthropicOriginal.Messages {
|
|
|
1199
1199
|
return stream2;
|
|
1200
1200
|
}
|
|
1201
1201
|
return value;
|
|
1202
|
+
}).catch(async (error) => {
|
|
1203
|
+
await captureAiGeneration(this.phClient, {
|
|
1204
|
+
...posthogParams,
|
|
1205
|
+
model: anthropicParams.model,
|
|
1206
|
+
provider: "anthropic",
|
|
1207
|
+
input: this.formatInputForPostHog(anthropicParams, posthogParams.privacyMode),
|
|
1208
|
+
output: [],
|
|
1209
|
+
latency: (Date.now() - startTime) / 1e3,
|
|
1210
|
+
baseURL: this.baseURL,
|
|
1211
|
+
modelParameters: getModelParams(body),
|
|
1212
|
+
httpStatus: error?.status ? error.status : 500,
|
|
1213
|
+
usage: {},
|
|
1214
|
+
error
|
|
1215
|
+
});
|
|
1216
|
+
throw error;
|
|
1202
1217
|
}), {
|
|
1203
1218
|
requestIdHeader: "request-id",
|
|
1204
1219
|
workspaceIdHeader: "anthropic-workspace-id"
|