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/dist/utilitas.lite.mjs +1 -1
- package/dist/utilitas.lite.mjs.map +1 -1
- package/lib/alan.mjs +4 -4
- package/lib/bot.mjs +13 -13
- package/lib/manifest.mjs +1 -1
- package/lib/memory.mjs +2 -2
- package/package.json +1 -1
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
|
|
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,
|
|
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,
|
|
907
|
+
messages, ...options, attachments,
|
|
908
908
|
});
|
|
909
909
|
break;
|
|
910
910
|
case VERTEX:
|
|
911
911
|
resp = await promptVertex(input, {
|
|
912
|
-
messages,
|
|
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
|
|
112
|
+
`CREATE INDEX IF NOT EXISTS ${table}_bot_id_index ON ${table} (bot_id)`,
|
|
113
113
|
], [
|
|
114
|
-
`CREATE INDEX IF NOT EXISTS
|
|
114
|
+
`CREATE INDEX IF NOT EXISTS ${table}_chat_id_index ON ${table} (chat_id)`,
|
|
115
115
|
], [
|
|
116
|
-
`CREATE INDEX IF NOT EXISTS
|
|
116
|
+
`CREATE INDEX IF NOT EXISTS ${table}_chat_type_index ON ${table} (chat_type)`,
|
|
117
117
|
], [
|
|
118
|
-
`CREATE INDEX IF NOT EXISTS
|
|
118
|
+
`CREATE INDEX IF NOT EXISTS ${table}_message_id_index ON ${table} (message_id)`,
|
|
119
119
|
], [
|
|
120
|
-
`CREATE INDEX IF NOT EXISTS
|
|
120
|
+
`CREATE INDEX IF NOT EXISTS ${table}_received_index ON ${table} (received)`,
|
|
121
121
|
], [
|
|
122
|
-
`CREATE INDEX IF NOT EXISTS
|
|
122
|
+
`CREATE INDEX IF NOT EXISTS ${table}_received_text_index ON ${table} (received_text)`,
|
|
123
123
|
], [
|
|
124
|
-
`CREATE INDEX IF NOT EXISTS
|
|
124
|
+
`CREATE INDEX IF NOT EXISTS ${table}_response_index ON ${table} (response)`,
|
|
125
125
|
], [
|
|
126
|
-
`CREATE INDEX IF NOT EXISTS
|
|
126
|
+
`CREATE INDEX IF NOT EXISTS ${table}_response_text_index ON ${table} (response_text)`,
|
|
127
127
|
], [
|
|
128
|
-
`CREATE INDEX IF NOT EXISTS
|
|
128
|
+
`CREATE INDEX IF NOT EXISTS ${table}_collected_index ON ${table} (collected)`,
|
|
129
129
|
], [
|
|
130
|
-
`CREATE INDEX IF NOT EXISTS
|
|
130
|
+
`CREATE INDEX IF NOT EXISTS ${table}_distilled_index ON ${table} (distilled)`,
|
|
131
131
|
], [
|
|
132
|
-
`CREATE INDEX IF NOT EXISTS
|
|
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
|
|
134
|
+
`CREATE INDEX IF NOT EXISTS ${table}_created_at_index ON ${table} (created_at)`,
|
|
135
135
|
], [
|
|
136
|
-
`CREATE INDEX IF NOT EXISTS
|
|
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
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
|
|
35
|
+
`CREATE INDEX IF NOT EXISTS ${table}_created_at_index ON ${table} (created_at)`,
|
|
36
36
|
], [
|
|
37
|
-
`CREATE INDEX IF NOT EXISTS
|
|
37
|
+
`CREATE INDEX IF NOT EXISTS ${table}_updated_at_index ON ${table} (updated_at)`,
|
|
38
38
|
]],
|
|
39
39
|
};
|
|
40
40
|
|