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.cjs CHANGED
@@ -499,7 +499,7 @@ __export(index_exports, {
499
499
  module.exports = __toCommonJS(index_exports);
500
500
 
501
501
  // src/version.generated.ts
502
- var __version__ = "0.21.0";
502
+ var __version__ = "0.21.1";
503
503
 
504
504
  // src/constants.ts
505
505
  var DEFAULT_SERVICE_URL = "https://bitfab.ai";
@@ -2432,9 +2432,15 @@ var BitfabOpenAITracingProcessor = class {
2432
2432
  * Extract and add input/response to serialized span, updating errors list.
2433
2433
  */
2434
2434
  extractSpanInputResponse(span, serializedSpan, errors) {
2435
+ if (span.spanData?.type !== "response") {
2436
+ return;
2437
+ }
2435
2438
  const spanData = serializedSpan.span_data;
2436
2439
  try {
2437
- spanData.input = span.spanData?._input || [];
2440
+ const input = span.spanData?._input;
2441
+ if (input !== void 0) {
2442
+ spanData.input = input;
2443
+ }
2438
2444
  } catch (error) {
2439
2445
  errors.push({
2440
2446
  source: "sdk",
@@ -2443,7 +2449,10 @@ var BitfabOpenAITracingProcessor = class {
2443
2449
  });
2444
2450
  }
2445
2451
  try {
2446
- spanData.response = span.spanData?._response || null;
2452
+ const response = span.spanData?._response;
2453
+ if (response !== void 0) {
2454
+ spanData.response = response;
2455
+ }
2447
2456
  } catch (error) {
2448
2457
  errors.push({
2449
2458
  source: "sdk",