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