190proof 1.0.43 → 1.0.45

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
@@ -31473,8 +31473,7 @@ async function callOpenAiWithRetries(identifier, openAiPayload, openAiConfig, re
31473
31473
  identifier,
31474
31474
  "Calling OpenAI API with retries:",
31475
31475
  openAiConfig == null ? void 0 : openAiConfig.service,
31476
- openAiPayload.model,
31477
- openAiConfig == null ? void 0 : openAiConfig.baseUrl
31476
+ openAiPayload.model
31478
31477
  );
31479
31478
  let errorObj;
31480
31479
  for (let i5 = 0; i5 <= retries; i5++) {
@@ -31559,14 +31558,10 @@ async function callOpenAIStream(identifier, openAiPayload, openAiConfig, chunkTi
31559
31558
  var _a3, _b, _c, _d, _e, _f, _g;
31560
31559
  const functionNames = openAiPayload.tools ? new Set(openAiPayload.tools.map((fn) => fn.function.name)) : null;
31561
31560
  if (!openAiConfig) {
31562
- const defaultOpenAIBaseUrl = (
31563
- // TODO: Remove this one we have per-provider configs
31564
- "https://gateway.ai.cloudflare.com/v1/932636fc124abb5171fd630afe668905/igpt"
31565
- );
31566
31561
  openAiConfig = {
31567
31562
  service: "openai",
31568
31563
  apiKey: process.env.OPENAI_API_KEY,
31569
- baseUrl: defaultOpenAIBaseUrl
31564
+ baseUrl: ""
31570
31565
  };
31571
31566
  }
31572
31567
  let response;
@@ -31584,7 +31579,7 @@ async function callOpenAIStream(identifier, openAiPayload, openAiConfig, chunkTi
31584
31579
  if (azureConfig.endpoint) {
31585
31580
  endpoint = `${azureConfig.endpoint}/openai/deployments/${azureConfig.deployment}/chat/completions?api-version=${azureConfig.apiVersion}`;
31586
31581
  } else {
31587
- endpoint = `${openAiConfig.baseUrl}/azure-openai/${azureConfig.resource}/${azureConfig.deployment}/chat/completions?api-version=${azureConfig.apiVersion}`;
31582
+ throw new Error("Azure OpenAI endpoint is required in modelConfigMap.");
31588
31583
  }
31589
31584
  console.log(identifier, "Using endpoint", endpoint);
31590
31585
  try {
@@ -31614,7 +31609,7 @@ async function callOpenAIStream(identifier, openAiPayload, openAiConfig, chunkTi
31614
31609
  });
31615
31610
  } else {
31616
31611
  console.log(identifier, "Using OpenAI service", openAiPayload.model);
31617
- const endpoint = `${openAiConfig.baseUrl}/openai/chat/completions`;
31612
+ const endpoint = `https://api.openai.com/v1/chat/completions`;
31618
31613
  if (openAiConfig.orgId) {
31619
31614
  console.log(identifier, "Using orgId", openAiConfig.orgId);
31620
31615
  }