@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.cjs CHANGED
@@ -490,7 +490,7 @@ __export(index_exports, {
490
490
  module.exports = __toCommonJS(index_exports);
491
491
 
492
492
  // src/version.generated.ts
493
- var __version__ = "0.21.0";
493
+ var __version__ = "0.21.1";
494
494
 
495
495
  // src/constants.ts
496
496
  var DEFAULT_SERVICE_URL = "https://bitfab.ai";
@@ -2423,9 +2423,15 @@ var BitfabOpenAITracingProcessor = class {
2423
2423
  * Extract and add input/response to serialized span, updating errors list.
2424
2424
  */
2425
2425
  extractSpanInputResponse(span, serializedSpan, errors) {
2426
+ if (span.spanData?.type !== "response") {
2427
+ return;
2428
+ }
2426
2429
  const spanData = serializedSpan.span_data;
2427
2430
  try {
2428
- spanData.input = span.spanData?._input || [];
2431
+ const input = span.spanData?._input;
2432
+ if (input !== void 0) {
2433
+ spanData.input = input;
2434
+ }
2429
2435
  } catch (error) {
2430
2436
  errors.push({
2431
2437
  source: "sdk",
@@ -2434,7 +2440,10 @@ var BitfabOpenAITracingProcessor = class {
2434
2440
  });
2435
2441
  }
2436
2442
  try {
2437
- spanData.response = span.spanData?._response || null;
2443
+ const response = span.spanData?._response;
2444
+ if (response !== void 0) {
2445
+ spanData.response = response;
2446
+ }
2438
2447
  } catch (error) {
2439
2448
  errors.push({
2440
2449
  source: "sdk",