theprogrammablemind 7.5.0-beta.49 → 7.5.0-beta.50
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 +9 -3
- package/package.json +1 -1
package/client.js
CHANGED
@@ -526,7 +526,7 @@ const processInstance = (config, instance) => {
|
|
526
526
|
global.transitoryMode = transitoryMode
|
527
527
|
}
|
528
528
|
|
529
|
-
const _process = async (config, query, { credentials, writeTests, isTest, saveDeveloper, testConfig, testsFN, errorHandler = defaultErrorHandler } = {}) => {
|
529
|
+
const _process = async (config, query, { commandLineArgs, credentials, writeTests, isTest, saveDeveloper, testConfig, testsFN, errorHandler = defaultErrorHandler } = {}) => {
|
530
530
|
if (credentials) {
|
531
531
|
config.server(credentials.server, credentials.key)
|
532
532
|
}
|
@@ -547,6 +547,9 @@ const _process = async (config, query, { credentials, writeTests, isTest, saveDe
|
|
547
547
|
}
|
548
548
|
|
549
549
|
let { data, /* generators, semantics, */ hierarchy } = setupProcessB({ config, allowDelta: true })
|
550
|
+
if (commandLineArgs && commandLineArgs.checkForLoop) {
|
551
|
+
data.checkForLoop = true
|
552
|
+
}
|
550
553
|
let queries = query.split('\\n')
|
551
554
|
|
552
555
|
try {
|
@@ -869,6 +872,7 @@ const submitBugToAPI = async (subscription_id, subscription_password, config) =>
|
|
869
872
|
})
|
870
873
|
}
|
871
874
|
|
875
|
+
/*
|
872
876
|
const submitBug = async (subscription_id, subscription_password, config, utterance, retries = 2) => {
|
873
877
|
// TODO remove these from the config
|
874
878
|
const properties = ['expected_contexts', 'expected_generated']
|
@@ -905,6 +909,7 @@ const submitBug = async (subscription_id, subscription_password, config, utteran
|
|
905
909
|
throw error
|
906
910
|
})
|
907
911
|
}
|
912
|
+
*/
|
908
913
|
|
909
914
|
const defaultErrorHandler = async (error) => {
|
910
915
|
if (error.logs) {
|
@@ -1278,6 +1283,7 @@ const knowledgeModule = async ({
|
|
1278
1283
|
parser.add_argument('-i', '--info', { action: 'store_true', help: 'Print meta-data for the module' })
|
1279
1284
|
parser.add_argument('-v', '--vimdiff', { action: 'store_true', help: 'For failures run vimdiff' })
|
1280
1285
|
parser.add_argument('-g', '--greg', { action: 'store_true', help: 'Set the server to be localhost so I can debug stuff' })
|
1286
|
+
parser.add_argument('-cl', '--checkForLoop', { action: 'store_true', help: 'Check for loops in the priorities' })
|
1281
1287
|
parser.add_argument('-r', '--retrain', { action: 'store_true', help: 'Get the server to retrain the neural nets' })
|
1282
1288
|
parser.add_argument('-q', '--query', { help: 'Run the specified query' })
|
1283
1289
|
parser.add_argument('-ip ', '--server', { help: 'Server to run against' })
|
@@ -1611,7 +1617,7 @@ const knowledgeModule = async ({
|
|
1611
1617
|
}
|
1612
1618
|
config.beforeQuery({ query: args.query, isModule: false, objects })
|
1613
1619
|
try {
|
1614
|
-
processResults(_process(config, args.query, { dontAddAssociations: args.dontAddAssociations, writeTests: args.save || args.saveDeveloper, saveDeveloper: args.saveDeveloper, testConfig, testsFN: test }))
|
1620
|
+
processResults(_process(config, args.query, { commandLineArgs: args, dontAddAssociations: args.dontAddAssociations, writeTests: args.save || args.saveDeveloper, saveDeveloper: args.saveDeveloper, testConfig, testsFN: test }))
|
1615
1621
|
} catch( error ) {
|
1616
1622
|
console.log('Error', error);
|
1617
1623
|
}
|
@@ -1668,7 +1674,7 @@ module.exports = {
|
|
1668
1674
|
process: _process,
|
1669
1675
|
where,
|
1670
1676
|
w,
|
1671
|
-
submitBug,
|
1677
|
+
// submitBug,
|
1672
1678
|
ensureTestFile,
|
1673
1679
|
build,
|
1674
1680
|
processContext,
|