Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix arguments after adding -url #872

Merged
merged 2 commits into from
Feb 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions tool/assistant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,23 +262,23 @@ export function initArgparse(subparsers : argparse.SubParser) {
export async function execute(args : any) {
if (!args.thingpedia_url)
args.thingpedia_url = await getConfig('thingpedia.url', process.env.THINGPEDIA_URL || DEFAULT_THINGPEDIA_URL);
if (!args.nlu_server)
args.nlu_server = await getConfig('thingpedia.nlp-url', DEFAULT_NLP_URL);
if (!args.nlu_server_url)
args.nlu_server_url = await getConfig('thingpedia.nlp-url', DEFAULT_NLP_URL);

const platform = new Platform(args.workdir, args.locale, args.thingpedia_url);
const prefs = platform.getSharedPreferences();
if (args.thingpedia_dir && args.thingpedia_dir.length)
prefs.set('developer-dir', args.thingpedia_dir);
prefs.set('experimental-use-neural-nlg', !!args.nlg_server);
prefs.set('experimental-use-neural-nlg', !!args.nlg_server_url);
const engine = new Engine(platform);

const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
rl.setPrompt('$ ');

await engine.open();
const conversation = await engine.assistant.getOrOpenConversation('main', {
nluServerUrl: args.nlu_server,
nlgServerUrl: args.nlg_server,
nluServerUrl: args.nlu_server_url,
nlgServerUrl: args.nlg_server_url,
debug: args.debug,
showWelcome: true
});
Expand Down
8 changes: 4 additions & 4 deletions tool/auto-annotate-multiwoz.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,8 @@ interface ConverterOptions {
timezone : string;
thingpedia : string;
database_file : string;
user_nlu_server : string;
agent_nlu_server : string;
user_nlu_server_url : string;
agent_nlu_server_url : string;
only_multidomain : boolean;
use_existing : boolean;
max_turn : number|undefined;
Expand Down Expand Up @@ -283,8 +283,8 @@ class Converter extends stream.Readable {
this._onlyMultidomain = args.only_multidomain;
this._tpClient = new Tp.FileClient(args);
this._schemas = new SchemaRetriever(this._tpClient, null, true);
this._userParser = ParserClient.get(args.user_nlu_server, 'en-US');
this._agentParser = ParserClient.get(args.agent_nlu_server, 'en-US');
this._userParser = ParserClient.get(args.user_nlu_server_url, 'en-US');
this._agentParser = ParserClient.get(args.agent_nlu_server_url, 'en-US');
this._useExisting = args.use_existing;
this._maxTurn = args.max_turn;
this._timezone = args.timezone;
Expand Down
1 change: 1 addition & 0 deletions tool/requote.js
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,7 @@ export async function execute(args) {
console.error('**************');
console.error('Failed to requote');
console.error(String(e));
console.error(ex.id);
console.error(ex.preprocessed);
console.error(ex.target_code);
console.error('**************');
Expand Down