utilitas 2001.1.75 → 2001.1.77

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
@@ -1280,7 +1280,7 @@ const talk = async (request, options = {}) => {
1280
1280
  images: Object.values(msgs).map(x => (x.images || []).map(y => caption(y, FEATURE_ICONS.image, x.model))).flat(),
1281
1281
  videos: Object.values(msgs).map(x => (x.videos || []).map(y => caption(y, FEATURE_ICONS.video, x.model))).flat(),
1282
1282
  annotations: Object.values(msgs).map(x => x.annotations || []).flat(),
1283
- models: Object.values(msgs).map(n => n.model),
1283
+ models: Object.values(msgs).map(x => x.model),
1284
1284
  });
1285
1285
  const multiStream = async (ai, r, opts) => {
1286
1286
  ai && r && (msgs[ai] = r);
@@ -1316,7 +1316,7 @@ const talk = async (request, options = {}) => {
1316
1316
  request && response && session.messages.push(chat);
1317
1317
  await setSession(sessionId, session, options);
1318
1318
  // tts
1319
- if ((options?.tts || session?.config?.tts)
1319
+ if ((options?.tts || session?.config?.tts) && response
1320
1320
  && Object.values(msgs).find(x => !x.audio?.length)) {
1321
1321
  await ignoreErrFunc(async () => {
1322
1322
  const ttsAi = await getAi(null, { select: { audio: true, fast: true } });
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": "2001.1.75",
4
+ "version": "2001.1.77",
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": "2001.1.75",
4
+ "version": "2001.1.77",
5
5
  "private": false,
6
6
  "homepage": "https://github.com/Leask/utilitas",
7
7
  "main": "index.mjs",