@posthog/ai 7.9.3 → 7.9.5
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 +1 -1
- package/dist/anthropic/index.cjs.map +1 -1
- package/dist/anthropic/index.mjs +1 -1
- package/dist/anthropic/index.mjs.map +1 -1
- package/dist/gemini/index.cjs +1 -1
- package/dist/gemini/index.cjs.map +1 -1
- package/dist/gemini/index.mjs +1 -1
- package/dist/gemini/index.mjs.map +1 -1
- package/dist/index.cjs +11 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +11 -1
- package/dist/index.mjs.map +1 -1
- package/dist/langchain/index.cjs +1 -1
- package/dist/langchain/index.cjs.map +1 -1
- package/dist/langchain/index.mjs +1 -1
- package/dist/langchain/index.mjs.map +1 -1
- package/dist/openai/index.cjs +12 -1
- package/dist/openai/index.cjs.map +1 -1
- package/dist/openai/index.mjs +12 -1
- package/dist/openai/index.mjs.map +1 -1
- package/dist/otel/index.cjs +1 -1
- package/dist/otel/index.cjs.map +1 -1
- package/dist/otel/index.mjs +1 -1
- package/dist/otel/index.mjs.map +1 -1
- package/dist/vercel/index.cjs +1 -1
- package/dist/vercel/index.cjs.map +1 -1
- package/dist/vercel/index.mjs +1 -1
- package/dist/vercel/index.mjs.map +1 -1
- package/package.json +7 -7
package/dist/index.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { uuidv7 } from '@posthog/core';
|
|
|
5
5
|
import AnthropicOriginal from '@anthropic-ai/sdk';
|
|
6
6
|
import { GoogleGenAI } from '@google/genai';
|
|
7
7
|
|
|
8
|
-
var version = "7.9.
|
|
8
|
+
var version = "7.9.5";
|
|
9
9
|
|
|
10
10
|
// Type guards for safer type checking
|
|
11
11
|
const isString = value => {
|
|
@@ -99,6 +99,16 @@ const sanitizeOpenAIImage = item => {
|
|
|
99
99
|
}
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
|
+
// Handle video_url format
|
|
103
|
+
if (item.type === 'video_url' && 'video_url' in item && isObject(item.video_url) && 'url' in item.video_url) {
|
|
104
|
+
return {
|
|
105
|
+
...item,
|
|
106
|
+
video_url: {
|
|
107
|
+
...item.video_url,
|
|
108
|
+
url: redactBase64DataUrl(item.video_url.url)
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
}
|
|
102
112
|
// Handle audio format
|
|
103
113
|
if (item.type === 'audio' && 'data' in item) {
|
|
104
114
|
if (isMultimodalEnabled()) return item;
|