bitfab 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
@@ -21,7 +21,7 @@ import {
21
21
  flushTraces,
22
22
  getCurrentSpan,
23
23
  getCurrentTrace
24
- } from "./chunk-UO3CIQ7R.js";
24
+ } from "./chunk-75LZO6JS.js";
25
25
  import {
26
26
  BitfabError
27
27
  } from "./chunk-EQI6ZJC3.js";
package/dist/node.cjs CHANGED
@@ -513,7 +513,7 @@ registerAsyncLocalStorageClass(
513
513
  );
514
514
 
515
515
  // src/version.generated.ts
516
- var __version__ = "0.21.0";
516
+ var __version__ = "0.21.1";
517
517
 
518
518
  // src/constants.ts
519
519
  var DEFAULT_SERVICE_URL = "https://bitfab.ai";
@@ -2446,9 +2446,15 @@ var BitfabOpenAITracingProcessor = class {
2446
2446
  * Extract and add input/response to serialized span, updating errors list.
2447
2447
  */
2448
2448
  extractSpanInputResponse(span, serializedSpan, errors) {
2449
+ if (span.spanData?.type !== "response") {
2450
+ return;
2451
+ }
2449
2452
  const spanData = serializedSpan.span_data;
2450
2453
  try {
2451
- spanData.input = span.spanData?._input || [];
2454
+ const input = span.spanData?._input;
2455
+ if (input !== void 0) {
2456
+ spanData.input = input;
2457
+ }
2452
2458
  } catch (error) {
2453
2459
  errors.push({
2454
2460
  source: "sdk",
@@ -2457,7 +2463,10 @@ var BitfabOpenAITracingProcessor = class {
2457
2463
  });
2458
2464
  }
2459
2465
  try {
2460
- spanData.response = span.spanData?._response || null;
2466
+ const response = span.spanData?._response;
2467
+ if (response !== void 0) {
2468
+ spanData.response = response;
2469
+ }
2461
2470
  } catch (error) {
2462
2471
  errors.push({
2463
2472
  source: "sdk",