@discomedia/utils 1.0.14 → 1.0.16

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.mjs CHANGED
@@ -309,12 +309,10 @@ class TimeFormatter {
309
309
  */
310
310
  class MarketTimeCalculator {
311
311
  calendar;
312
- formatter;
313
312
  timezone;
314
313
  constructor(timezone = MARKET_CONFIG.TIMEZONE) {
315
314
  this.timezone = timezone;
316
315
  this.calendar = new MarketCalendar(timezone);
317
- this.formatter = new TimeFormatter(timezone);
318
316
  }
319
317
  /**
320
318
  * Get market open/close times for a date
@@ -804,7 +802,7 @@ function getTradingStartAndEndDates(options = {}) {
804
802
  }
805
803
  return { startDate, endDate: endMarketClose };
806
804
  }
807
- // Export the old MARKET_TIMES constant for backward compatibility
805
+ // Export the MARKET_TIMES constant for backward compatibility
808
806
  const MARKET_TIMES = {
809
807
  TIMEZONE: MARKET_CONFIG.TIMEZONE,
810
808
  PRE: {
@@ -9401,7 +9399,7 @@ const makeResponsesAPICall = async (input, options = {}) => {
9401
9399
  * });
9402
9400
  */
9403
9401
  async function makeLLMCall(input, options = {}) {
9404
- const { apiKey, model = DEFAULT_MODEL$1, responseFormat = 'text', tools, useCodeInterpreter = false, useWebSearch = false, imageBase64, imageDetail = 'high', context } = options;
9402
+ const { apiKey, model = DEFAULT_MODEL$1, responseFormat = 'text', tools, useCodeInterpreter = false, useWebSearch = false, imageBase64, imageDetail = 'high', context, } = options;
9405
9403
  // Validate model
9406
9404
  const normalizedModel = normalizeModelName(model);
9407
9405
  if (!isSupportedModel(normalizedModel)) {
@@ -9417,7 +9415,7 @@ async function makeLLMCall(input, options = {}) {
9417
9415
  conversationMessages.push({
9418
9416
  role: contextMsg.role,
9419
9417
  content: contextMsg.content,
9420
- type: 'message'
9418
+ type: 'message',
9421
9419
  });
9422
9420
  }
9423
9421
  // Add current input message
@@ -9431,9 +9429,9 @@ async function makeLLMCall(input, options = {}) {
9431
9429
  type: 'input_image',
9432
9430
  detail: imageDetail,
9433
9431
  image_url: imageBase64.startsWith('data:') ? imageBase64 : `data:image/webp;base64,${imageBase64}`,
9434
- }
9432
+ },
9435
9433
  ],
9436
- type: 'message'
9434
+ type: 'message',
9437
9435
  });
9438
9436
  }
9439
9437
  else {
@@ -9441,7 +9439,7 @@ async function makeLLMCall(input, options = {}) {
9441
9439
  conversationMessages.push({
9442
9440
  role: 'user',
9443
9441
  content: input,
9444
- type: 'message'
9442
+ type: 'message',
9445
9443
  });
9446
9444
  }
9447
9445
  processedInput = conversationMessages;
@@ -9457,10 +9455,10 @@ async function makeLLMCall(input, options = {}) {
9457
9455
  type: 'input_image',
9458
9456
  detail: imageDetail,
9459
9457
  image_url: imageBase64.startsWith('data:') ? imageBase64 : `data:image/webp;base64,${imageBase64}`,
9460
- }
9458
+ },
9461
9459
  ],
9462
- type: 'message'
9463
- }
9460
+ type: 'message',
9461
+ },
9464
9462
  ];
9465
9463
  }
9466
9464
  else {