190proof 1.0.113 → 1.0.115
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/README.md +5 -0
- package/dist/index.d.mts +23 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -315,6 +315,7 @@ async function prepareOpenAIPayload(identifier, payload) {
|
|
|
315
315
|
const preparedPayload = {
|
|
316
316
|
model: payload.model,
|
|
317
317
|
messages: [],
|
|
318
|
+
reasoning_effort: payload.reasoningEffort,
|
|
318
319
|
tools: (_a = payload.functions) == null ? void 0 : _a.map((fn) => ({
|
|
319
320
|
type: "function",
|
|
320
321
|
function: fn
|
|
@@ -914,6 +915,7 @@ async function prepareGoogleAIPayload(_identifier, payload) {
|
|
|
914
915
|
const preparedPayload = {
|
|
915
916
|
model: payload.model,
|
|
916
917
|
messages: [],
|
|
918
|
+
thinkingConfig: payload.thinkingConfig,
|
|
917
919
|
tools: payload.functions ? {
|
|
918
920
|
functionDeclarations: payload.functions.map((fn) => ({
|
|
919
921
|
name: fn.name,
|
|
@@ -1010,7 +1012,10 @@ async function callGoogleAI(id, payload, requestTimeoutMs = 12e4, signal) {
|
|
|
1010
1012
|
const contents = jigGoogleMessages(payload.messages);
|
|
1011
1013
|
const requestBody = {
|
|
1012
1014
|
contents,
|
|
1013
|
-
generationConfig: {
|
|
1015
|
+
generationConfig: {
|
|
1016
|
+
responseModalities: ["TEXT"],
|
|
1017
|
+
...payload.thinkingConfig ? { thinkingConfig: payload.thinkingConfig } : {}
|
|
1018
|
+
}
|
|
1014
1019
|
};
|
|
1015
1020
|
if (payload.tools)
|
|
1016
1021
|
requestBody.tools = [payload.tools];
|
|
@@ -1116,7 +1121,8 @@ async function callGoogleAI(id, payload, requestTimeoutMs = 12e4, signal) {
|
|
|
1116
1121
|
prompt_tokens: (_o = response.usageMetadata.promptTokenCount) != null ? _o : 0,
|
|
1117
1122
|
completion_tokens: (_p = response.usageMetadata.candidatesTokenCount) != null ? _p : 0,
|
|
1118
1123
|
total_tokens: (_q = response.usageMetadata.totalTokenCount) != null ? _q : 0,
|
|
1119
|
-
cached_tokens: (_r = response.usageMetadata.cachedContentTokenCount) != null ? _r : 0
|
|
1124
|
+
cached_tokens: (_r = response.usageMetadata.cachedContentTokenCount) != null ? _r : 0,
|
|
1125
|
+
thoughts_tokens: response.usageMetadata.thoughtsTokenCount
|
|
1120
1126
|
} : null
|
|
1121
1127
|
};
|
|
1122
1128
|
}
|