@saltcorn/large-language-model 0.4.1 → 0.4.3
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/function-insert-action.js +2 -0
- package/generate.js +1 -1
- package/index.js +6 -0
- package/package.json +1 -1
|
@@ -12,6 +12,8 @@ const noSpaces = (s) => s.replaceAll(" ", "");
|
|
|
12
12
|
module.exports = (config) => ({
|
|
13
13
|
description: "Use LLM function call to insert rows in tables",
|
|
14
14
|
requireRow: true,
|
|
15
|
+
disableInList: true,
|
|
16
|
+
disableInBuilder: true,
|
|
15
17
|
configFields: async ({ table }) => {
|
|
16
18
|
const tables = await Table.find();
|
|
17
19
|
return [
|
package/generate.js
CHANGED
|
@@ -33,7 +33,7 @@ const getEmbedding = async (config, opts) => {
|
|
|
33
33
|
const { Ollama } = ollamaMod;
|
|
34
34
|
const ollama = new Ollama();
|
|
35
35
|
const olres = await ollama.embeddings({
|
|
36
|
-
model: opts?.model || config.model,
|
|
36
|
+
model: opts?.model || config.embed_model || config.model,
|
|
37
37
|
prompt: opts.prompt,
|
|
38
38
|
});
|
|
39
39
|
//console.log("embedding response ", olres);
|
package/index.js
CHANGED
|
@@ -96,6 +96,12 @@ const configuration_workflow = () =>
|
|
|
96
96
|
type: "String",
|
|
97
97
|
showIf: { backend: ["OpenAI-compatible API", "Local Ollama"] },
|
|
98
98
|
},
|
|
99
|
+
{
|
|
100
|
+
name: "embed_model",
|
|
101
|
+
label: "Embedding model",
|
|
102
|
+
type: "String",
|
|
103
|
+
showIf: { backend: "Local Ollama" },
|
|
104
|
+
},
|
|
99
105
|
{
|
|
100
106
|
name: "endpoint",
|
|
101
107
|
label: "Chat completions endpoint",
|