@discomedia/utils 1.0.15 → 1.0.16
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-frontend.cjs +8 -8
- package/dist/index-frontend.cjs.map +1 -1
- package/dist/index-frontend.mjs +8 -8
- package/dist/index-frontend.mjs.map +1 -1
- package/dist/index.cjs +8 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +8 -8
- package/dist/index.mjs.map +1 -1
- package/dist/package.json +1 -1
- package/dist/test.js +8 -8
- package/dist/test.js.map +1 -1
- package/dist/types/llm-openai.d.ts +1 -8
- package/dist/types/llm-openai.d.ts.map +1 -1
- package/dist/types/types/llm-types.d.ts +7 -0
- package/dist/types/types/llm-types.d.ts.map +1 -1
- package/dist/types-frontend/llm-openai.d.ts +1 -8
- package/dist/types-frontend/llm-openai.d.ts.map +1 -1
- package/dist/types-frontend/types/llm-types.d.ts +7 -0
- package/dist/types-frontend/types/llm-types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -9401,7 +9401,7 @@ const makeResponsesAPICall = async (input, options = {}) => {
|
|
|
9401
9401
|
* });
|
|
9402
9402
|
*/
|
|
9403
9403
|
async function makeLLMCall(input, options = {}) {
|
|
9404
|
-
const { apiKey, model = DEFAULT_MODEL$1, responseFormat = 'text', tools, useCodeInterpreter = false, useWebSearch = false, imageBase64, imageDetail = 'high', context } = options;
|
|
9404
|
+
const { apiKey, model = DEFAULT_MODEL$1, responseFormat = 'text', tools, useCodeInterpreter = false, useWebSearch = false, imageBase64, imageDetail = 'high', context, } = options;
|
|
9405
9405
|
// Validate model
|
|
9406
9406
|
const normalizedModel = normalizeModelName(model);
|
|
9407
9407
|
if (!isSupportedModel(normalizedModel)) {
|
|
@@ -9417,7 +9417,7 @@ async function makeLLMCall(input, options = {}) {
|
|
|
9417
9417
|
conversationMessages.push({
|
|
9418
9418
|
role: contextMsg.role,
|
|
9419
9419
|
content: contextMsg.content,
|
|
9420
|
-
type: 'message'
|
|
9420
|
+
type: 'message',
|
|
9421
9421
|
});
|
|
9422
9422
|
}
|
|
9423
9423
|
// Add current input message
|
|
@@ -9431,9 +9431,9 @@ async function makeLLMCall(input, options = {}) {
|
|
|
9431
9431
|
type: 'input_image',
|
|
9432
9432
|
detail: imageDetail,
|
|
9433
9433
|
image_url: imageBase64.startsWith('data:') ? imageBase64 : `data:image/webp;base64,${imageBase64}`,
|
|
9434
|
-
}
|
|
9434
|
+
},
|
|
9435
9435
|
],
|
|
9436
|
-
type: 'message'
|
|
9436
|
+
type: 'message',
|
|
9437
9437
|
});
|
|
9438
9438
|
}
|
|
9439
9439
|
else {
|
|
@@ -9441,7 +9441,7 @@ async function makeLLMCall(input, options = {}) {
|
|
|
9441
9441
|
conversationMessages.push({
|
|
9442
9442
|
role: 'user',
|
|
9443
9443
|
content: input,
|
|
9444
|
-
type: 'message'
|
|
9444
|
+
type: 'message',
|
|
9445
9445
|
});
|
|
9446
9446
|
}
|
|
9447
9447
|
processedInput = conversationMessages;
|
|
@@ -9457,10 +9457,10 @@ async function makeLLMCall(input, options = {}) {
|
|
|
9457
9457
|
type: 'input_image',
|
|
9458
9458
|
detail: imageDetail,
|
|
9459
9459
|
image_url: imageBase64.startsWith('data:') ? imageBase64 : `data:image/webp;base64,${imageBase64}`,
|
|
9460
|
-
}
|
|
9460
|
+
},
|
|
9461
9461
|
],
|
|
9462
|
-
type: 'message'
|
|
9463
|
-
}
|
|
9462
|
+
type: 'message',
|
|
9463
|
+
},
|
|
9464
9464
|
];
|
|
9465
9465
|
}
|
|
9466
9466
|
else {
|