@bitfab/sdk 0.21.0 → 0.21.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/index.d.cts CHANGED
@@ -1089,7 +1089,7 @@ declare class BitfabFunction {
1089
1089
  /**
1090
1090
  * SDK version from package.json (injected at build time)
1091
1091
  */
1092
- declare const __version__ = "0.21.0";
1092
+ declare const __version__ = "0.21.1";
1093
1093
 
1094
1094
  /**
1095
1095
  * Constants for the Bitfab SDK.
package/dist/index.d.ts CHANGED
@@ -1089,7 +1089,7 @@ declare class BitfabFunction {
1089
1089
  /**
1090
1090
  * SDK version from package.json (injected at build time)
1091
1091
  */
1092
- declare const __version__ = "0.21.0";
1092
+ declare const __version__ = "0.21.1";
1093
1093
 
1094
1094
  /**
1095
1095
  * Constants for the Bitfab SDK.
package/dist/index.js CHANGED
@@ -12,7 +12,7 @@ import {
12
12
  flushTraces,
13
13
  getCurrentSpan,
14
14
  getCurrentTrace
15
- } from "./chunk-UO3CIQ7R.js";
15
+ } from "./chunk-75LZO6JS.js";
16
16
  import {
17
17
  BitfabError
18
18
  } from "./chunk-EQI6ZJC3.js";
package/dist/node.cjs CHANGED
@@ -504,7 +504,7 @@ registerAsyncLocalStorageClass(
504
504
  );
505
505
 
506
506
  // src/version.generated.ts
507
- var __version__ = "0.21.0";
507
+ var __version__ = "0.21.1";
508
508
 
509
509
  // src/constants.ts
510
510
  var DEFAULT_SERVICE_URL = "https://bitfab.ai";
@@ -2437,9 +2437,15 @@ var BitfabOpenAITracingProcessor = class {
2437
2437
  * Extract and add input/response to serialized span, updating errors list.
2438
2438
  */
2439
2439
  extractSpanInputResponse(span, serializedSpan, errors) {
2440
+ if (span.spanData?.type !== "response") {
2441
+ return;
2442
+ }
2440
2443
  const spanData = serializedSpan.span_data;
2441
2444
  try {
2442
- spanData.input = span.spanData?._input || [];
2445
+ const input = span.spanData?._input;
2446
+ if (input !== void 0) {
2447
+ spanData.input = input;
2448
+ }
2443
2449
  } catch (error) {
2444
2450
  errors.push({
2445
2451
  source: "sdk",
@@ -2448,7 +2454,10 @@ var BitfabOpenAITracingProcessor = class {
2448
2454
  });
2449
2455
  }
2450
2456
  try {
2451
- spanData.response = span.spanData?._response || null;
2457
+ const response = span.spanData?._response;
2458
+ if (response !== void 0) {
2459
+ spanData.response = response;
2460
+ }
2452
2461
  } catch (error) {
2453
2462
  errors.push({
2454
2463
  source: "sdk",