@llmops/sdk 0.6.1-beta.2 → 0.6.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/dist/{agents-exporter-C0mNajZs.cjs → agents-exporter-BuTq2n2y.cjs} +6 -2
- package/dist/{agents-exporter-vcQaaBwp.mjs → agents-exporter-CxbWY6xN.mjs} +6 -2
- package/dist/agents.cjs +1 -1
- package/dist/agents.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +3 -3
|
@@ -102,9 +102,13 @@ function convertSpanDataToAttributes(data, error) {
|
|
|
102
102
|
const usage = resp.usage;
|
|
103
103
|
if (usage?.input_tokens != null) attrs.push(kv("gen_ai.usage.input_tokens", usage.input_tokens));
|
|
104
104
|
if (usage?.output_tokens != null) attrs.push(kv("gen_ai.usage.output_tokens", usage.output_tokens));
|
|
105
|
-
if (resp.output != null)
|
|
105
|
+
if (resp.output != null) try {
|
|
106
|
+
attrs.push(kv("gen_ai.completion", JSON.stringify(resp.output)));
|
|
107
|
+
} catch {}
|
|
106
108
|
}
|
|
107
|
-
if (data._input != null)
|
|
109
|
+
if (data._input != null) try {
|
|
110
|
+
attrs.push(kv("ai.prompt.messages", JSON.stringify(data._input)));
|
|
111
|
+
} catch {}
|
|
108
112
|
break;
|
|
109
113
|
}
|
|
110
114
|
case "custom":
|
|
@@ -101,9 +101,13 @@ function convertSpanDataToAttributes(data, error) {
|
|
|
101
101
|
const usage = resp.usage;
|
|
102
102
|
if (usage?.input_tokens != null) attrs.push(kv("gen_ai.usage.input_tokens", usage.input_tokens));
|
|
103
103
|
if (usage?.output_tokens != null) attrs.push(kv("gen_ai.usage.output_tokens", usage.output_tokens));
|
|
104
|
-
if (resp.output != null)
|
|
104
|
+
if (resp.output != null) try {
|
|
105
|
+
attrs.push(kv("gen_ai.completion", JSON.stringify(resp.output)));
|
|
106
|
+
} catch {}
|
|
105
107
|
}
|
|
106
|
-
if (data._input != null)
|
|
108
|
+
if (data._input != null) try {
|
|
109
|
+
attrs.push(kv("ai.prompt.messages", JSON.stringify(data._input)));
|
|
110
|
+
} catch {}
|
|
107
111
|
break;
|
|
108
112
|
}
|
|
109
113
|
case "custom":
|
package/dist/agents.cjs
CHANGED
package/dist/agents.mjs
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_express = require('./express-B-wbCza5.cjs');
|
|
2
|
-
const require_agents_exporter = require('./agents-exporter-
|
|
2
|
+
const require_agents_exporter = require('./agents-exporter-BuTq2n2y.cjs');
|
|
3
3
|
let __llmops_core = require("@llmops/core");
|
|
4
4
|
let __llmops_app = require("@llmops/app");
|
|
5
5
|
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as createLLMOpsMiddleware } from "./express-ClEIbLM9.mjs";
|
|
2
|
-
import { t as createLLMOpsAgentsExporter } from "./agents-exporter-
|
|
2
|
+
import { t as createLLMOpsAgentsExporter } from "./agents-exporter-CxbWY6xN.mjs";
|
|
3
3
|
import { LLMOPS_INTERNAL_HEADER, LLMOPS_SPAN_NAME_HEADER, LLMOPS_TRACE_ID_HEADER, LLMOPS_TRACE_NAME_HEADER } from "@llmops/core";
|
|
4
4
|
import { createApp } from "@llmops/app";
|
|
5
5
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@llmops/sdk",
|
|
3
|
-
"version": "0.6.1
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "An LLMOps toolkit for TypeScript applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -84,8 +84,8 @@
|
|
|
84
84
|
"access": "public"
|
|
85
85
|
},
|
|
86
86
|
"dependencies": {
|
|
87
|
-
"@llmops/app": "^0.6.1
|
|
88
|
-
"@llmops/core": "^0.6.1
|
|
87
|
+
"@llmops/app": "^0.6.1",
|
|
88
|
+
"@llmops/core": "^0.6.1"
|
|
89
89
|
},
|
|
90
90
|
"devDependencies": {
|
|
91
91
|
"@types/express": "^5.0.6",
|