utilitas 1995.2.69 → 1995.2.71

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
@@ -363,6 +363,8 @@ const promptChatGPT = async (content, options) => {
363
363
  };
364
364
 
365
365
  const promptOllama = async (content, options) => {
366
+ // @todo: Is it cool to use Ollama official API instead this implementation:
367
+ // https://github.com/ollama/ollama-js
366
368
  const { endpoint } = await getOllamaClient(options);
367
369
  // https://github.com/jmorganca/ollama/blob/main/examples/typescript-simplechat/client.ts
368
370
  const resp = await fetch(`${endpoint}/api/chat`, {
@@ -887,7 +889,7 @@ const talk = async (input, options) => {
887
889
  const attachments = [];
888
890
  (options?.attachments || []).filter(
889
891
  x => _MODEL.supportedMimeTypes.includes(x.mime_type)
890
- ).map(attachments.push);
892
+ ).map(x => attachments.push(x));
891
893
  log(`Prompt: ${JSON.stringify(input)}`);
892
894
  switch (engine) {
893
895
  case CHATGPT:
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": "1995.2.69",
4
+ "version": "1995.2.71",
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": "1995.2.69",
4
+ "version": "1995.2.71",
5
5
  "private": false,
6
6
  "homepage": "https://github.com/Leask/utilitas",
7
7
  "main": "index.mjs",