@llmops/sdk 0.6.1-beta.2 → 0.6.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.
@@ -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) attrs.push(kv("gen_ai.completion", JSON.stringify(resp.output)));
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) attrs.push(kv("ai.prompt.messages", JSON.stringify(data._input)));
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) attrs.push(kv("gen_ai.completion", JSON.stringify(resp.output)));
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) attrs.push(kv("ai.prompt.messages", JSON.stringify(data._input)));
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
@@ -1,3 +1,3 @@
1
- const require_agents_exporter = require('./agents-exporter-C0mNajZs.cjs');
1
+ const require_agents_exporter = require('./agents-exporter-BuTq2n2y.cjs');
2
2
 
3
3
  exports.createLLMOpsAgentsExporter = require_agents_exporter.createLLMOpsAgentsExporter;
package/dist/agents.mjs CHANGED
@@ -1,3 +1,3 @@
1
- import { t as createLLMOpsAgentsExporter } from "./agents-exporter-vcQaaBwp.mjs";
1
+ import { t as createLLMOpsAgentsExporter } from "./agents-exporter-CxbWY6xN.mjs";
2
2
 
3
3
  export { createLLMOpsAgentsExporter };
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-C0mNajZs.cjs');
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-vcQaaBwp.mjs";
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-beta.2",
3
+ "version": "0.6.2",
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-beta.2",
88
- "@llmops/core": "^0.6.1-beta.2"
87
+ "@llmops/app": "^0.6.2",
88
+ "@llmops/core": "^0.6.2"
89
89
  },
90
90
  "devDependencies": {
91
91
  "@types/express": "^5.0.6",