-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Trigger phrase is missing... Locale: 'en'. #21
Comments
Hm, seems like that not |
So now that I've figured out how to get import { JovoModelGoogle } from "jovo-model-google";
import * as fs from "fs";
import * as path from "path";
import YAML from "yaml";
const jovoModelInstance = new JovoModelGoogle();
const jovoModelData = JSON.parse(
fs.readFileSync("models/en-US.json").toString()
);
const locale = "en-US";
jovoModelInstance.importJovoModel(jovoModelData, locale);
const modelFiles = jovoModelInstance.exportNative();
fs.rmdirSync("platforms/googleAction2/custom", {
recursive: true,
});
modelFiles!.forEach((value) => {
value.path = value.path.map((value1) => value1.replace("AMAZON.", ""));
});
const paths = modelFiles!.map((value, index) => {
return `${index}: ${value.path.join("/")}`;
});
console.log(`Paths: `, paths);
modelFiles!.forEach((value) => {
const filepath = `platforms/googleAction2/${value.path.join("/")}`;
const dirname = path.dirname(filepath);
fs.mkdirSync(dirname, { recursive: true });
const content = YAML.stringify(value.content);
fs.writeFileSync(filepath, content);
});
// TODO prepend correct handler name to webhook file
// TODO purge invalid training phrases: yes, no, off
// TODO figure out what metadata is still missing
console.log(`DONE!`); |
Yes, this is a bug that'll be fixed and deployed with the newest version. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It seems that
gactions push
isn't quite happy with the paths emitted by jovo-model:intents/en-US/Foo.yaml
.If I take the entire contents of
en-US
and drop them directly into theintents
folder, the push succeeds.The text was updated successfully, but these errors were encountered: