@posthog/ai 8.6.3 → 8.6.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.
- package/dist/anthropic/index.cjs +83 -4
- package/dist/anthropic/index.cjs.map +1 -1
- package/dist/anthropic/index.d.ts +2 -3
- package/dist/anthropic/index.mjs +83 -4
- package/dist/anthropic/index.mjs.map +1 -1
- package/dist/gemini/index.cjs +3 -1
- package/dist/gemini/index.cjs.map +1 -1
- package/dist/gemini/index.mjs +3 -1
- package/dist/gemini/index.mjs.map +1 -1
- package/dist/index.cjs +3 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +3 -1
- package/dist/index.mjs.map +1 -1
- package/dist/langchain/index.cjs +1 -1
- package/dist/langchain/index.mjs +1 -1
- package/dist/openai/index.cjs +158 -90
- package/dist/openai/index.cjs.map +1 -1
- package/dist/openai/index.d.ts +2 -2
- package/dist/openai/index.mjs +158 -90
- 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 +3 -1
- package/dist/vercel/index.cjs.map +1 -1
- package/dist/vercel/index.mjs +3 -1
- package/dist/vercel/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -143,7 +143,7 @@ const truncate = input => {
|
|
|
143
143
|
return `${truncatedStr}... [truncated]`;
|
|
144
144
|
};
|
|
145
145
|
|
|
146
|
-
var version = "8.6.
|
|
146
|
+
var version = "8.6.4";
|
|
147
147
|
|
|
148
148
|
// Warn when a wrapper's base_url points at the PostHog AI Gateway: the gateway
|
|
149
149
|
// emits its own $ai_generation, so each call would be captured (and, for billable
|
|
@@ -141,7 +141,7 @@ const truncate = input => {
|
|
|
141
141
|
return `${truncatedStr}... [truncated]`;
|
|
142
142
|
};
|
|
143
143
|
|
|
144
|
-
var version = "8.6.
|
|
144
|
+
var version = "8.6.4";
|
|
145
145
|
|
|
146
146
|
// Warn when a wrapper's base_url points at the PostHog AI Gateway: the gateway
|
|
147
147
|
// emits its own $ai_generation, so each call would be captured (and, for billable
|
package/dist/vercel/index.cjs
CHANGED
|
@@ -397,7 +397,7 @@ function sanitizeValues(obj) {
|
|
|
397
397
|
return jsonSafe;
|
|
398
398
|
}
|
|
399
399
|
|
|
400
|
-
var version = "8.6.
|
|
400
|
+
var version = "8.6.4";
|
|
401
401
|
|
|
402
402
|
const DEFAULT_MAX_DEPTH = 3;
|
|
403
403
|
const MAX_STACK_LINES = 20;
|
|
@@ -530,6 +530,8 @@ const captureAiGeneration = async (client, options) => {
|
|
|
530
530
|
if (httpStatus === undefined) {
|
|
531
531
|
if (typeof options.error === 'object' && 'status' in options.error && typeof options.error.status === 'number') {
|
|
532
532
|
httpStatus = options.error.status;
|
|
533
|
+
} else if (typeof options.error === 'object' && 'statusCode' in options.error && typeof options.error.statusCode === 'number') {
|
|
534
|
+
httpStatus = options.error.statusCode;
|
|
533
535
|
} else {
|
|
534
536
|
httpStatus = 500;
|
|
535
537
|
}
|