utilitas 1995.2.65 → 1995.2.67

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
@@ -886,13 +886,13 @@ const talk = async (input, options) => {
886
886
  const chat = { request: input };
887
887
  const attachments = [];
888
888
  (options?.attachments || []).filter(
889
- x => _MODEL.supportedMimeTypes[x.mime_type]
889
+ x => _MODEL.supportedMimeTypes.includes(x.mime_type)
890
890
  ).map(attachments.push);
891
891
  log(`Prompt: ${JSON.stringify(input)}`);
892
892
  switch (engine) {
893
893
  case CHATGPT:
894
894
  resp = await promptChatGPT(input, {
895
- messages, attachments, model, ...options,
895
+ messages, model, ...options, attachments,
896
896
  });
897
897
  break;
898
898
  case ASSISTANT:
@@ -904,12 +904,12 @@ const talk = async (input, options) => {
904
904
  break;
905
905
  case GEMINI:
906
906
  resp = await promptGemini(input, {
907
- messages, attachments, ...options,
907
+ messages, ...options, attachments,
908
908
  });
909
909
  break;
910
910
  case VERTEX:
911
911
  resp = await promptVertex(input, {
912
- messages, attachments, ...options,
912
+ messages, ...options, attachments,
913
913
  });
914
914
  break;
915
915
  case OLLAMA:
package/lib/bot.mjs CHANGED
@@ -109,31 +109,31 @@ const initSql = {
109
109
  updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
110
110
  )`)
111
111
  ], [
112
- `CREATE INDEX IF NOT EXISTS bot_id_index ON ${table} (bot_id)`,
112
+ `CREATE INDEX IF NOT EXISTS ${table}_bot_id_index ON ${table} (bot_id)`,
113
113
  ], [
114
- `CREATE INDEX IF NOT EXISTS chat_id_index ON ${table} (chat_id)`,
114
+ `CREATE INDEX IF NOT EXISTS ${table}_chat_id_index ON ${table} (chat_id)`,
115
115
  ], [
116
- `CREATE INDEX IF NOT EXISTS chat_type_index ON ${table} (chat_type)`,
116
+ `CREATE INDEX IF NOT EXISTS ${table}_chat_type_index ON ${table} (chat_type)`,
117
117
  ], [
118
- `CREATE INDEX IF NOT EXISTS message_id_index ON ${table} (message_id)`,
118
+ `CREATE INDEX IF NOT EXISTS ${table}_message_id_index ON ${table} (message_id)`,
119
119
  ], [
120
- `CREATE INDEX IF NOT EXISTS received_index ON ${table} (received)`,
120
+ `CREATE INDEX IF NOT EXISTS ${table}_received_index ON ${table} (received)`,
121
121
  ], [
122
- `CREATE INDEX IF NOT EXISTS received_text_index ON ${table} (received_text)`,
122
+ `CREATE INDEX IF NOT EXISTS ${table}_received_text_index ON ${table} (received_text)`,
123
123
  ], [
124
- `CREATE INDEX IF NOT EXISTS response_index ON ${table} (response)`,
124
+ `CREATE INDEX IF NOT EXISTS ${table}_response_index ON ${table} (response)`,
125
125
  ], [
126
- `CREATE INDEX IF NOT EXISTS response_text_index ON ${table} (response_text)`,
126
+ `CREATE INDEX IF NOT EXISTS ${table}_response_text_index ON ${table} (response_text)`,
127
127
  ], [
128
- `CREATE INDEX IF NOT EXISTS collected_index ON ${table} (collected)`,
128
+ `CREATE INDEX IF NOT EXISTS ${table}_collected_index ON ${table} (collected)`,
129
129
  ], [
130
- `CREATE INDEX IF NOT EXISTS distilled_index ON ${table} (distilled)`,
130
+ `CREATE INDEX IF NOT EXISTS ${table}_distilled_index ON ${table} (distilled)`,
131
131
  ], [
132
- `CREATE INDEX IF NOT EXISTS distilled_vector_index ON ${table} USING hnsw(distilled_vector vector_cosine_ops)`,
132
+ `CREATE INDEX IF NOT EXISTS ${table}_distilled_vector_index ON ${table} USING hnsw(distilled_vector vector_cosine_ops)`,
133
133
  ], [
134
- `CREATE INDEX IF NOT EXISTS created_at_index ON ${table} (created_at)`,
134
+ `CREATE INDEX IF NOT EXISTS ${table}_created_at_index ON ${table} (created_at)`,
135
135
  ], [
136
- `CREATE INDEX IF NOT EXISTS updated_at_index ON ${table} (updated_at)`,
136
+ `CREATE INDEX IF NOT EXISTS ${table}_updated_at_index ON ${table} (updated_at)`,
137
137
  ]],
138
138
  };
139
139
 
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.65",
4
+ "version": "1995.2.67",
5
5
  "private": false,
6
6
  "homepage": "https://github.com/Leask/utilitas",
7
7
  "main": "index.mjs",
package/lib/memory.mjs CHANGED
@@ -32,9 +32,9 @@ const initSql = {
32
32
  // Error: index row size 2776 exceeds btree version 4 maximum 2704 for index "value_index"
33
33
  // @todo: Fix this issue, by @Leask.
34
34
  ], /* [`CREATE INDEX IF NOT EXISTS value_index ON ${table} (value)`], */[
35
- `CREATE INDEX IF NOT EXISTS created_at_index ON ${table} (created_at)`,
35
+ `CREATE INDEX IF NOT EXISTS ${table}_created_at_index ON ${table} (created_at)`,
36
36
  ], [
37
- `CREATE INDEX IF NOT EXISTS updated_at_index ON ${table} (updated_at)`,
37
+ `CREATE INDEX IF NOT EXISTS ${table}_updated_at_index ON ${table} (updated_at)`,
38
38
  ]],
39
39
  };
40
40
 
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.65",
4
+ "version": "1995.2.67",
5
5
  "private": false,
6
6
  "homepage": "https://github.com/Leask/utilitas",
7
7
  "main": "index.mjs",