@posthog/ai 7.16.1 → 7.16.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/anthropic/index.cjs +1 -1
- package/dist/anthropic/index.mjs +1 -1
- package/dist/gemini/index.cjs +1 -1
- package/dist/gemini/index.mjs +1 -1
- package/dist/index.cjs +4 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +4 -2
- 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 +1 -1
- package/dist/openai/index.mjs +1 -1
- package/dist/openai-agents/index.cjs +1 -1
- package/dist/openai-agents/index.mjs +1 -1
- package/dist/vercel/index.cjs +4 -2
- package/dist/vercel/index.cjs.map +1 -1
- package/dist/vercel/index.mjs +4 -2
- package/dist/vercel/index.mjs.map +1 -1
- package/package.json +3 -3
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.16.
|
|
8
|
+
var version = "7.16.2";
|
|
9
9
|
|
|
10
10
|
// Type guards for safer type checking
|
|
11
11
|
const isString = value => {
|
|
@@ -2189,12 +2189,14 @@ const mapVercelOutput = result => {
|
|
|
2189
2189
|
};
|
|
2190
2190
|
}
|
|
2191
2191
|
if (item.type === 'tool-call') {
|
|
2192
|
+
const toolCall = item;
|
|
2193
|
+
const rawArgs = toolCall.input ?? toolCall.args ?? toolCall.arguments ?? {};
|
|
2192
2194
|
return {
|
|
2193
2195
|
type: 'tool-call',
|
|
2194
2196
|
id: item.toolCallId,
|
|
2195
2197
|
function: {
|
|
2196
2198
|
name: item.toolName,
|
|
2197
|
-
arguments:
|
|
2199
|
+
arguments: typeof rawArgs === 'string' ? rawArgs : JSON.stringify(rawArgs)
|
|
2198
2200
|
}
|
|
2199
2201
|
};
|
|
2200
2202
|
}
|