@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.mjs
CHANGED
|
@@ -9399,7 +9399,7 @@ const makeResponsesAPICall = async (input, options = {}) => {
|
|
|
9399
9399
|
* });
|
|
9400
9400
|
*/
|
|
9401
9401
|
async function makeLLMCall(input, options = {}) {
|
|
9402
|
-
const { apiKey, model = DEFAULT_MODEL$1, responseFormat = 'text', tools, useCodeInterpreter = false, useWebSearch = false, imageBase64, imageDetail = 'high', context } = options;
|
|
9402
|
+
const { apiKey, model = DEFAULT_MODEL$1, responseFormat = 'text', tools, useCodeInterpreter = false, useWebSearch = false, imageBase64, imageDetail = 'high', context, } = options;
|
|
9403
9403
|
// Validate model
|
|
9404
9404
|
const normalizedModel = normalizeModelName(model);
|
|
9405
9405
|
if (!isSupportedModel(normalizedModel)) {
|
|
@@ -9415,7 +9415,7 @@ async function makeLLMCall(input, options = {}) {
|
|
|
9415
9415
|
conversationMessages.push({
|
|
9416
9416
|
role: contextMsg.role,
|
|
9417
9417
|
content: contextMsg.content,
|
|
9418
|
-
type: 'message'
|
|
9418
|
+
type: 'message',
|
|
9419
9419
|
});
|
|
9420
9420
|
}
|
|
9421
9421
|
// Add current input message
|
|
@@ -9429,9 +9429,9 @@ async function makeLLMCall(input, options = {}) {
|
|
|
9429
9429
|
type: 'input_image',
|
|
9430
9430
|
detail: imageDetail,
|
|
9431
9431
|
image_url: imageBase64.startsWith('data:') ? imageBase64 : `data:image/webp;base64,${imageBase64}`,
|
|
9432
|
-
}
|
|
9432
|
+
},
|
|
9433
9433
|
],
|
|
9434
|
-
type: 'message'
|
|
9434
|
+
type: 'message',
|
|
9435
9435
|
});
|
|
9436
9436
|
}
|
|
9437
9437
|
else {
|
|
@@ -9439,7 +9439,7 @@ async function makeLLMCall(input, options = {}) {
|
|
|
9439
9439
|
conversationMessages.push({
|
|
9440
9440
|
role: 'user',
|
|
9441
9441
|
content: input,
|
|
9442
|
-
type: 'message'
|
|
9442
|
+
type: 'message',
|
|
9443
9443
|
});
|
|
9444
9444
|
}
|
|
9445
9445
|
processedInput = conversationMessages;
|
|
@@ -9455,10 +9455,10 @@ async function makeLLMCall(input, options = {}) {
|
|
|
9455
9455
|
type: 'input_image',
|
|
9456
9456
|
detail: imageDetail,
|
|
9457
9457
|
image_url: imageBase64.startsWith('data:') ? imageBase64 : `data:image/webp;base64,${imageBase64}`,
|
|
9458
|
-
}
|
|
9458
|
+
},
|
|
9459
9459
|
],
|
|
9460
|
-
type: 'message'
|
|
9461
|
-
}
|
|
9460
|
+
type: 'message',
|
|
9461
|
+
},
|
|
9462
9462
|
];
|
|
9463
9463
|
}
|
|
9464
9464
|
else {
|