@saltcorn/large-language-model 1.0.11 → 1.0.12

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.
Files changed (3) hide show
  1. package/generate.js +7 -4
  2. package/index.js +9 -0
  3. package/package.json +1 -1
package/generate.js CHANGED
@@ -212,11 +212,14 @@ const genericResponse = async (
212
212
  if (role === "assistant" && typeof prompt === "string")
213
213
  opts.chat.push({
214
214
  role,
215
- content: [{
216
- type: "text",
217
- text: prompt,
218
- }],
215
+ content: [
216
+ {
217
+ type: "text",
218
+ text: prompt,
219
+ },
220
+ ],
219
221
  });
222
+ else opts.chat.push({ role, content: prompt });
220
223
  break;
221
224
  default:
222
225
  opts.chat.push({ role, content: prompt });
package/index.js CHANGED
@@ -92,6 +92,7 @@ ${domReady(`
92
92
  type: "String",
93
93
  required: true,
94
94
  fieldview: "password",
95
+ attributes: { autocomplete: "off" },
95
96
  showIf: { backend: "AI SDK", ai_sdk_provider: "OpenAI" },
96
97
  },
97
98
  {
@@ -100,6 +101,7 @@ ${domReady(`
100
101
  type: "String",
101
102
  required: true,
102
103
  fieldview: "password",
104
+ attributes: { autocomplete: "off" },
103
105
  showIf: { backend: "AI SDK", ai_sdk_provider: "Anthropic" },
104
106
  },
105
107
  {
@@ -155,6 +157,7 @@ ${domReady(`
155
157
  type: "String",
156
158
  required: true,
157
159
  fieldview: "password",
160
+ attributes: { autocomplete: "off" },
158
161
  showIf: { backend: "OpenAI" },
159
162
  },
160
163
  {
@@ -317,6 +320,8 @@ ${domReady(`
317
320
  name: "api_key",
318
321
  label: "API key",
319
322
  type: "String",
323
+ fieldview: "password",
324
+ attributes: { autocomplete: "off" },
320
325
  showIf: { backend: "OpenAI-compatible API" },
321
326
  },
322
327
  {
@@ -388,6 +393,8 @@ ${domReady(`
388
393
  name: "api_key",
389
394
  label: "API key",
390
395
  type: "String",
396
+ fieldview: "password",
397
+ attributes: { autocomplete: "off" },
391
398
  },
392
399
  ],
393
400
  }),
@@ -412,6 +419,7 @@ ${domReady(`
412
419
  type: "String",
413
420
  required: true,
414
421
  fieldview: "password",
422
+ attributes: { autocomplete: "off" },
415
423
  showIf: { alt_provider: "OpenAI" },
416
424
  },
417
425
  {
@@ -420,6 +428,7 @@ ${domReady(`
420
428
  type: "String",
421
429
  required: true,
422
430
  fieldview: "password",
431
+ attributes: { autocomplete: "off" },
423
432
  showIf: { alt_provider: "Anthropic" },
424
433
  },
425
434
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saltcorn/large-language-model",
3
- "version": "1.0.11",
3
+ "version": "1.0.12",
4
4
  "description": "Large language models and functionality for Saltcorn",
5
5
  "main": "index.js",
6
6
  "dependencies": {