190proof 1.0.44 → 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.js +3 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -31479,8 +31479,7 @@ async function callOpenAiWithRetries(identifier, openAiPayload, openAiConfig, re
|
|
|
31479
31479
|
identifier,
|
|
31480
31480
|
"Calling OpenAI API with retries:",
|
|
31481
31481
|
openAiConfig == null ? void 0 : openAiConfig.service,
|
|
31482
|
-
openAiPayload.model
|
|
31483
|
-
openAiConfig == null ? void 0 : openAiConfig.baseUrl
|
|
31482
|
+
openAiPayload.model
|
|
31484
31483
|
);
|
|
31485
31484
|
let errorObj;
|
|
31486
31485
|
for (let i5 = 0; i5 <= retries; i5++) {
|
|
@@ -31565,14 +31564,10 @@ async function callOpenAIStream(identifier, openAiPayload, openAiConfig, chunkTi
|
|
|
31565
31564
|
var _a3, _b, _c, _d, _e, _f, _g;
|
|
31566
31565
|
const functionNames = openAiPayload.tools ? new Set(openAiPayload.tools.map((fn) => fn.function.name)) : null;
|
|
31567
31566
|
if (!openAiConfig) {
|
|
31568
|
-
const defaultOpenAIBaseUrl = (
|
|
31569
|
-
// TODO: Remove this one we have per-provider configs
|
|
31570
|
-
"https://gateway.ai.cloudflare.com/v1/932636fc124abb5171fd630afe668905/igpt"
|
|
31571
|
-
);
|
|
31572
31567
|
openAiConfig = {
|
|
31573
31568
|
service: "openai",
|
|
31574
31569
|
apiKey: process.env.OPENAI_API_KEY,
|
|
31575
|
-
baseUrl:
|
|
31570
|
+
baseUrl: ""
|
|
31576
31571
|
};
|
|
31577
31572
|
}
|
|
31578
31573
|
let response;
|
|
@@ -31590,7 +31585,7 @@ async function callOpenAIStream(identifier, openAiPayload, openAiConfig, chunkTi
|
|
|
31590
31585
|
if (azureConfig.endpoint) {
|
|
31591
31586
|
endpoint = `${azureConfig.endpoint}/openai/deployments/${azureConfig.deployment}/chat/completions?api-version=${azureConfig.apiVersion}`;
|
|
31592
31587
|
} else {
|
|
31593
|
-
endpoint
|
|
31588
|
+
throw new Error("Azure OpenAI endpoint is required in modelConfigMap.");
|
|
31594
31589
|
}
|
|
31595
31590
|
console.log(identifier, "Using endpoint", endpoint);
|
|
31596
31591
|
try {
|