theprogrammablemind_4wp 9.2.0-beta.2 → 9.2.0-beta.4

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
@@ -265,6 +265,7 @@ const _process = async (config, query, { initializer, commandLineArgs, credentia
265
265
  if (credentials) {
266
266
  config.server(credentials.server, credentials.key)
267
267
  }
268
+
268
269
  const url = config._server
269
270
  const queryParams = config._queryParams || ''
270
271
  const retries = 2
@@ -280,7 +281,7 @@ const _process = async (config, query, { initializer, commandLineArgs, credentia
280
281
  throw error
281
282
  }
282
283
 
283
- let { data, /* generators, semantics, */ hierarchy } = setupProcessB({ config, initializer, allowDelta: true })
284
+ let { data, /* generators, semantics, */ hierarchy } = setupProcessB({ config, initializer, allowDelta: true, rebuildingTemplate })
284
285
  if (commandLineArgs && commandLineArgs.checkForLoop) {
285
286
  data.checkForLoop = commandLineArgs.checkForLoop
286
287
  }
@@ -371,6 +372,7 @@ const _process = async (config, query, { initializer, commandLineArgs, credentia
371
372
  response.version = json.version
372
373
  response.explain_priorities = json.explain_priorities
373
374
  response.contextual_priorities_ambiguities = json.contextual_priorities_ambiguities
375
+ response.rtf_associations = json.rtf_associations
374
376
 
375
377
  response.contexts = response.contexts.concat(contextsPrime)
376
378
  response.generated = response.generated.concat(generatedPrime)
package/package.json CHANGED
@@ -69,6 +69,6 @@
69
69
  "sort-json": "^2.0.0",
70
70
  "uuid": "^8.3.2"
71
71
  },
72
- "version": "9.2.0-beta.2",
72
+ "version": "9.2.0-beta.4",
73
73
  "license": "UNLICENSED"
74
74
  }
@@ -1,5 +1,6 @@
1
1
  const { InitCalls } = require('./helpers')
2
2
  const DigraphInternal = require('./digraph_internal')
3
+ const debug = require('./debug')
3
4
 
4
5
  const gs = (g) => async (contexts, separator, lastSeparator) => {
5
6
  if (!Array.isArray(contexts)) {
@@ -215,10 +216,12 @@ const processContext = async (context, { objects = {}, config, logs = [] }) => {
215
216
  return { context, generated, paraphrases, responses }
216
217
  }
217
218
 
218
- const setupProcessB = ({ config, initializer, allowDelta = false } = {}) => {
219
+ const setupProcessB = ({ config, initializer, allowDelta = false, rebuildingTemplate = false } = {}) => {
219
220
  const key = config._key
220
-
221
221
  const data = Object.assign({ key, version: '3' }, { uuid: config._uuid })
222
+ if (rebuildingTemplate) {
223
+ data.return_rtf_associations = true
224
+ }
222
225
  if (allowDelta && config.allowDelta && config.hasDelta()) {
223
226
  // console.log('config', config)
224
227
  data.delta = config.delta()
@@ -414,6 +417,15 @@ const loadInstance = async (config, instance) => {
414
417
  const transitoryMode = global.transitoryMode
415
418
  global.transitoryMode = false
416
419
 
420
+ /*
421
+ if (config.name == 'people' && instance.name == 'people') {
422
+ debugger
423
+ }
424
+ */
425
+ const rl = instance.resultss.length
426
+ if (rl > 0) {
427
+ config.addAssociations(instance.resultss[instance.resultss.length-1].rtf_associations || [])
428
+ }
417
429
  /*
418
430
  TODO needs updating if still wanted
419
431
  if (instance && (instance.associations || instance.learned_contextual_priorities)) {