utilitas 1999.1.8 → 1999.1.9

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/lib/alan.mjs CHANGED
@@ -204,7 +204,8 @@ for (const n in MODELS) {
204
204
  MODELS[GEMMA327B] = MODELS[GEMMA_3_27B]; // Ollama Alias
205
205
  MODELS[GEMINI_20_FLASH].image = GEMINI_20_FLASH_EXP;
206
206
  MODELS[GEMINI_20_FLASH_EXP] = {
207
- ...MODELS[GEMINI_20_FLASH], image: true, tools: false,
207
+ ...MODELS[GEMINI_20_FLASH],
208
+ name: GEMINI_20_FLASH_EXP, image: true, tools: false,
208
209
  };
209
210
 
210
211
  // Default models for each provider
@@ -1067,6 +1068,7 @@ const promptGemini = async (aiId, content, options = {}) => {
1067
1068
  let [result, references, functionCalls, responded, images]
1068
1069
  = [options.result ?? '', null, null, false, []];
1069
1070
  options.model = options.model || model.name;
1071
+ model.image && (options.imageMode = true);
1070
1072
  assert(!(options.imageMode && !model.image), 'Image mode is not supported.');
1071
1073
  if (String.isString(model.image)) {
1072
1074
  options.model = model.image;
package/lib/bot.mjs CHANGED
@@ -426,7 +426,7 @@ const subconscious = [{
426
426
  ctx.list = async (list, options) => await ctx.ok(uList(list), options);
427
427
  ctx.map = async (obj, options) => await ctx.ok(map(obj), options);
428
428
  ctx.media = async (fnc, src, options) => ctx.done.push(await ctx[fnc]({
429
- [src.toLowerCase().startsWith('http') ? 'url' : 'source']: src
429
+ [src?.toLowerCase?.()?.startsWith?.('http') ? 'url' : 'source']: src
430
430
  }, getExtra(ctx, options)));
431
431
  ctx.audio = async (sr, op) => await ctx.media('replyWithAudio', sr, op);
432
432
  ctx.image = async (sr, op) => await ctx.media('replyWithPhoto', sr, op);
package/lib/manifest.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  const manifest = {
2
2
  "name": "utilitas",
3
3
  "description": "Just another common utility for JavaScript.",
4
- "version": "1999.1.8",
4
+ "version": "1999.1.9",
5
5
  "private": false,
6
6
  "homepage": "https://github.com/Leask/utilitas",
7
7
  "main": "index.mjs",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "utilitas",
3
3
  "description": "Just another common utility for JavaScript.",
4
- "version": "1999.1.8",
4
+ "version": "1999.1.9",
5
5
  "private": false,
6
6
  "homepage": "https://github.com/Leask/utilitas",
7
7
  "main": "index.mjs",