190proof 1.0.14 → 1.0.15

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
@@ -31495,14 +31495,13 @@ async function callOpenAiWithRetries(identifier, openAiPayload, openAiConfig, re
31495
31495
  openAiPayload.model = "gpt-4-turbo-2024-04-09" /* GPT4_0409 */;
31496
31496
  openAiPayload.temperature = 0.8;
31497
31497
  if (errorCode === "content_policy_violation") {
31498
- openAiPayload.messages = openAiPayload.messages.map(
31499
- (message) => {
31500
- return {
31501
- ...message,
31502
- files: []
31503
- };
31498
+ openAiPayload.messages.forEach((message) => {
31499
+ if (Array.isArray(message.content)) {
31500
+ message.content = message.content.filter(
31501
+ (content) => content.type === "text"
31502
+ );
31504
31503
  }
31505
- );
31504
+ });
31506
31505
  }
31507
31506
  if (i5 >= 2 && (openAiConfig == null ? void 0 : openAiConfig.service) === "azure" && errorCode === "content_filter") {
31508
31507
  console.log(