@posthog/ai 6.4.4 → 6.5.0
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 +15 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +15 -5
- package/dist/index.mjs.map +1 -1
- package/dist/langchain/index.cjs +5 -3
- package/dist/langchain/index.cjs.map +1 -1
- package/dist/langchain/index.mjs +5 -3
- package/dist/langchain/index.mjs.map +1 -1
- package/dist/openai/index.cjs +1 -1
- package/dist/openai/index.mjs +1 -1
- package/dist/vercel/index.cjs +11 -3
- package/dist/vercel/index.cjs.map +1 -1
- package/dist/vercel/index.mjs +11 -3
- package/dist/vercel/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/anthropic/index.cjs
CHANGED
package/dist/anthropic/index.mjs
CHANGED
package/dist/gemini/index.cjs
CHANGED
package/dist/gemini/index.mjs
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -26,7 +26,7 @@ function _interopNamespaceDefault(e) {
|
|
|
26
26
|
|
|
27
27
|
var uuid__namespace = /*#__PURE__*/_interopNamespaceDefault(uuid);
|
|
28
28
|
|
|
29
|
-
var version = "6.
|
|
29
|
+
var version = "6.5.0";
|
|
30
30
|
|
|
31
31
|
// Type guards for safer type checking
|
|
32
32
|
const isString = value => {
|
|
@@ -1838,7 +1838,11 @@ const createInstrumentationMiddleware = (phClient, model, options) => {
|
|
|
1838
1838
|
const startTime = Date.now();
|
|
1839
1839
|
const mergedParams = {
|
|
1840
1840
|
...options,
|
|
1841
|
-
...mapVercelParams(params)
|
|
1841
|
+
...mapVercelParams(params),
|
|
1842
|
+
posthogProperties: {
|
|
1843
|
+
...options.posthogProperties,
|
|
1844
|
+
$ai_framework: 'vercel'
|
|
1845
|
+
}
|
|
1842
1846
|
};
|
|
1843
1847
|
const availableTools = extractAvailableToolCalls('vercel', params);
|
|
1844
1848
|
try {
|
|
@@ -1914,7 +1918,11 @@ const createInstrumentationMiddleware = (phClient, model, options) => {
|
|
|
1914
1918
|
let usage = {};
|
|
1915
1919
|
const mergedParams = {
|
|
1916
1920
|
...options,
|
|
1917
|
-
...mapVercelParams(params)
|
|
1921
|
+
...mapVercelParams(params),
|
|
1922
|
+
posthogProperties: {
|
|
1923
|
+
...options.posthogProperties,
|
|
1924
|
+
$ai_framework: 'vercel'
|
|
1925
|
+
}
|
|
1918
1926
|
};
|
|
1919
1927
|
const modelId = options.posthogModelOverride ?? model.modelId;
|
|
1920
1928
|
const provider = options.posthogProviderOverride ?? extractProvider(model);
|
|
@@ -3348,7 +3356,8 @@ class LangChainCallbackHandler extends BaseCallbackHandler {
|
|
|
3348
3356
|
$ai_input_state: withPrivacyMode(this.client, this.privacyMode, run.input),
|
|
3349
3357
|
$ai_latency: latency,
|
|
3350
3358
|
$ai_span_name: run.name,
|
|
3351
|
-
$ai_span_id: runId
|
|
3359
|
+
$ai_span_id: runId,
|
|
3360
|
+
$ai_framework: 'langchain'
|
|
3352
3361
|
};
|
|
3353
3362
|
if (parentRunId) {
|
|
3354
3363
|
eventProperties['$ai_parent_id'] = parentRunId;
|
|
@@ -3396,7 +3405,8 @@ class LangChainCallbackHandler extends BaseCallbackHandler {
|
|
|
3396
3405
|
$ai_input: withPrivacyMode(this.client, this.privacyMode, run.input),
|
|
3397
3406
|
$ai_http_status: 200,
|
|
3398
3407
|
$ai_latency: latency,
|
|
3399
|
-
$ai_base_url: run.baseUrl
|
|
3408
|
+
$ai_base_url: run.baseUrl,
|
|
3409
|
+
$ai_framework: 'langchain'
|
|
3400
3410
|
};
|
|
3401
3411
|
if (run.tools) {
|
|
3402
3412
|
eventProperties['$ai_tools'] = run.tools;
|