@saltcorn/large-language-model 0.9.6 → 0.9.7

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 (2) hide show
  1. package/index.js +10 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -906,6 +906,12 @@ module.exports = {
906
906
  sublabel: "A short description of what you want to generate.",
907
907
  type: "String",
908
908
  },
909
+ {
910
+ name: "model",
911
+ label: "Model",
912
+ sublabel: "Override default model name",
913
+ type: "String",
914
+ },
909
915
  {
910
916
  input_type: "section_header",
911
917
  label: "JSON fields to generate",
@@ -922,16 +928,18 @@ module.exports = {
922
928
  configuration: {
923
929
  prompt_template,
924
930
  fields,
925
- mulitple,
931
+ multiple,
926
932
  gen_description,
927
933
  answer_field,
928
934
  override_config,
929
935
  chat_history_field,
936
+ model,
930
937
  },
931
938
  }) => {
932
939
  let prompt = interpolate(prompt_template, row, user);
933
940
 
934
941
  const opts = {};
942
+ if (model) opts.model = model;
935
943
  if (override_config) {
936
944
  const altcfg = config.altconfigs.find(
937
945
  (c) => c.name === override_config
@@ -958,7 +966,7 @@ module.exports = {
958
966
  });
959
967
  const argObj = { type: "object", properties: fieldArgs };
960
968
  const args = {
961
- [answer_field]: mulitple ? { type: "array", items: argObj } : argObj,
969
+ [answer_field]: multiple ? { type: "array", items: argObj } : argObj,
962
970
  };
963
971
  const expert_function = {
964
972
  type: "function",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saltcorn/large-language-model",
3
- "version": "0.9.6",
3
+ "version": "0.9.7",
4
4
  "description": "Large language models and functionality for Saltcorn",
5
5
  "main": "index.js",
6
6
  "dependencies": {