theprogrammablemind 8.9.1-beta.25 → 8.9.1-beta.27

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/client.js CHANGED
@@ -148,7 +148,7 @@ const writeTestFile = (fn, tests) => {
148
148
  runtime.fs.writeFileSync(fn, stringify(tests, { space: 2 }), { encoding: 'utf8', flag: 'w+' })
149
149
  }
150
150
 
151
- const writeTest = (fn, query, objects, generated, paraphrases, responses, contexts, associations, metadata, config, saveDeveloper, paraphrasesParenthesized, generatedParenthesized) => {
151
+ const writeTest = (fn, query, objects, generated, paraphrases, responses, contexts, associations, metadata, config, saveDeveloper, paraphrasesParenthesized, generatedParenthesized, summaries) => {
152
152
  let tests = []
153
153
  if (runtime.fs.existsSync(fn)) {
154
154
  tests = JSON.parse(runtime.fs.readFileSync(fn))
@@ -160,6 +160,7 @@ const writeTest = (fn, query, objects, generated, paraphrases, responses, contex
160
160
  // tests[query] = sortJson({ paraphrases, responses, contexts, objects: convertToStable(objects), associations, metadata, config, developerTest: saveDeveloper }, { depth: 25 })
161
161
  const results = sortJson({
162
162
  query,
163
+ summaries,
163
164
  paraphrases,
164
165
  responses,
165
166
  contexts,
@@ -298,6 +299,7 @@ const _process = async (config, query, { initializer, commandLineArgs, credentia
298
299
  }
299
300
 
300
301
  let startCounter = 0
302
+ const summaries = []
301
303
  while (true) {
302
304
  if (queries.length === 0) {
303
305
  break
@@ -326,6 +328,9 @@ const _process = async (config, query, { initializer, commandLineArgs, credentia
326
328
  }
327
329
  }
328
330
  json.contexts = json.results
331
+ if (json.summaries) {
332
+ summaries.push(json.summaries)
333
+ }
329
334
  startCounter = json.end_counter + 1
330
335
  delete json.results
331
336
  if (json.status !== 200) {
@@ -363,6 +368,7 @@ const _process = async (config, query, { initializer, commandLineArgs, credentia
363
368
  response.paraphrasesParenthesized = response.paraphrasesParenthesized.concat(paraphrasesParenthesizedPrime)
364
369
  response.generatedParenthesized = response.generatedParenthesized.concat(generatedParenthesizedPrime)
365
370
  response.responses = response.responses.concat(responsesPrime)
371
+ response.summaries = summaries
366
372
  queries = queries.slice(1)
367
373
  }
368
374
  }
@@ -374,7 +380,7 @@ const _process = async (config, query, { initializer, commandLineArgs, credentia
374
380
  for (const km of config.configs) {
375
381
  saveObjects.nameToUUID[km.name] = km.uuid
376
382
  }
377
- writeTest(testsFN, query, saveObjects, response.generated, response.paraphrases, response.responses, response.contexts, response.associations, response.metadata, actual_config, saveDeveloper, response.paraphrasesParenthesized, response.generatedParenthesized)
383
+ writeTest(testsFN, query, saveObjects, response.generated, response.paraphrases, response.responses, response.contexts, response.associations, response.metadata, actual_config, saveDeveloper, response.paraphrasesParenthesized, response.generatedParenthesized, summaries)
378
384
  }
379
385
 
380
386
  return response
@@ -608,7 +614,7 @@ const saveTest = async (testFile, config, test, expected, testConfig, saveDevelo
608
614
  for (const km of config.configs) {
609
615
  saveObjects.nameToUUID[km.name] = km.uuid
610
616
  }
611
- writeTest(testFile, test, saveObjects, result.generated, result.paraphrases, result.responses, result.contexts, result.associations, result.metadata, actualConfig, saveDeveloper, result.paraphrasesParenthesized, result.generatedParenthesized)
617
+ writeTest(testFile, test, saveObjects, result.generated, result.paraphrases, result.responses, result.contexts, result.associations, result.metadata, actualConfig, saveDeveloper, result.paraphrasesParenthesized, result.generatedParenthesized, result.summaries)
612
618
  }
613
619
 
614
620
  const saveTestsHelper = async (testFile, config, tests, todo, testConfig, saveDeveloper) => {
package/package.json CHANGED
@@ -67,6 +67,6 @@
67
67
  "sort-json": "^2.0.0",
68
68
  "uuid": "^8.3.2"
69
69
  },
70
- "version": "8.9.1-beta.25",
70
+ "version": "8.9.1-beta.27",
71
71
  "license": "UNLICENSED"
72
72
  }
package/src/config.js CHANGED
@@ -443,7 +443,7 @@ const handleCalculatedProps = (baseConfig, moreConfig, { addFirst, uuid } = {})
443
443
  if (moreConfig.bridges) {
444
444
  moreConfig.bridges = moreConfig.bridges.map((bridge) => {
445
445
  bridge = { ...bridge }
446
- const valid = ['after', 'before', 'bridge', 'development', 'evaluator', 'evaluators', 'generatorp', 'generatorr', 'generatorpr', 'generators', 'operator', 'id', 'convolution', 'inverted', 'isA', 'children', 'parents',
446
+ const valid = ['after', 'before', 'bridge', 'development', 'return_type_selector', 'evaluator', 'evaluators', 'generatorp', 'generatorr', 'generatorpr', 'generators', 'operator', 'id', 'convolution', 'inverted', 'isA', 'children', 'parents',
447
447
  'level', 'optional', 'selector', 'semantic', 'semantics', 'words', /Bridge$/, 'localHierarchy', 'levelSpecificHierarchy', 'where', 'uuid']
448
448
  helpers.validProps(valid, bridge, 'bridge')
449
449
  handleBridgeProps(baseConfig, bridge, { addFirst, uuid })
@@ -2976,7 +2976,7 @@ class Config {
2976
2976
  async add (...createConfigs) {
2977
2977
  createConfigs.forEach((createConfig, index) => {
2978
2978
  if (typeof createConfig !== 'function') {
2979
- throw new Error(`Expected add argument number ${index + 1} to be a function that constructs the config.`)
2979
+ throw new Error(`Expected add argument number ${index + 1} to be a function that constructs the config. This can happen if you have a loop in your includes. Sorry I am too tired to add a good error message. Good luck! I know you can figure it out. I have confidence in you.`)
2980
2980
  }
2981
2981
  })
2982
2982