🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

190proof

Package Overview
Dependencies
Maintainers
1
Versions
95
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

190proof - npm Package Compare versions

Comparing version
1.0.94
to
1.0.95
+32
-2
dist/index.js

@@ -453,3 +453,3 @@ "use strict";

async function callOpenAI(id, openAiPayload, openAiConfig) {
var _a, _b, _c, _d;
var _a, _b, _c, _d, _e;
const { endpoint, headers } = buildOpenAIRequestConfig(

@@ -494,2 +494,12 @@ id,

}
if (!((_c = choice.message) == null ? void 0 : _c.content) && !functionCalls.length) {
logger_default.error(
id,
"OpenAI: received message without content or function_call:",
JSON.stringify(data)
);
throw new Error(
"OpenAI: received message without content or function_call"
);
}
return {

@@ -505,3 +515,3 @@ role: "assistant",

total_tokens: data.usage.total_tokens,
cached_tokens: (_d = (_c = data.usage.prompt_tokens_details) == null ? void 0 : _c.cached_tokens) != null ? _d : 0
cached_tokens: (_e = (_d = data.usage.prompt_tokens_details) == null ? void 0 : _d.cached_tokens) != null ? _e : 0
} : null

@@ -1058,2 +1068,12 @@ };

}
if (!answer.content && !functionCalls.length) {
logger_default.error(
id,
"Groq: received message without content or function_call:",
JSON.stringify(response.data)
);
throw new Error(
"Groq: received message without content or function_call"
);
}
return {

@@ -1118,2 +1138,12 @@ role: "assistant",

}
if (!answer.content && !functionCalls.length) {
logger_default.error(
id,
"OpenRouter: received message without content or function_call:",
JSON.stringify(response.data)
);
throw new Error(
"OpenRouter: received message without content or function_call"
);
}
return {

@@ -1120,0 +1150,0 @@ role: "assistant",

@@ -422,3 +422,3 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {

async function callOpenAI(id, openAiPayload, openAiConfig) {
var _a, _b, _c, _d;
var _a, _b, _c, _d, _e;
const { endpoint, headers } = buildOpenAIRequestConfig(

@@ -463,2 +463,12 @@ id,

}
if (!((_c = choice.message) == null ? void 0 : _c.content) && !functionCalls.length) {
logger_default.error(
id,
"OpenAI: received message without content or function_call:",
JSON.stringify(data)
);
throw new Error(
"OpenAI: received message without content or function_call"
);
}
return {

@@ -474,3 +484,3 @@ role: "assistant",

total_tokens: data.usage.total_tokens,
cached_tokens: (_d = (_c = data.usage.prompt_tokens_details) == null ? void 0 : _c.cached_tokens) != null ? _d : 0
cached_tokens: (_e = (_d = data.usage.prompt_tokens_details) == null ? void 0 : _d.cached_tokens) != null ? _e : 0
} : null

@@ -1027,2 +1037,12 @@ };

}
if (!answer.content && !functionCalls.length) {
logger_default.error(
id,
"Groq: received message without content or function_call:",
JSON.stringify(response.data)
);
throw new Error(
"Groq: received message without content or function_call"
);
}
return {

@@ -1087,2 +1107,12 @@ role: "assistant",

}
if (!answer.content && !functionCalls.length) {
logger_default.error(
id,
"OpenRouter: received message without content or function_call:",
JSON.stringify(response.data)
);
throw new Error(
"OpenRouter: received message without content or function_call"
);
}
return {

@@ -1089,0 +1119,0 @@ role: "assistant",

+1
-1
{
"name": "190proof",
"version": "1.0.94",
"version": "1.0.95",
"description": "",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display