kata-ai / kata-cli Goto Github PK
View Code? Open in Web Editor NEWKata CLI
Kata CLI
Dear team kata,
Command remove-member sudah tidak bisa ya?
Ketika dicoba, even tidak ada di list of commands nya.
Selain itu, mgkn kah untuk add new user as admin dan juga downgrade admin menjadi teammember?
Kata CLI version 2.6.0
Thank you.
When #8 is done, users will get confused since there are two similar commands: kata version
and kata versions
, deprecate kata versions
(make new command for this but don't delete it yet, since some users might still use it), rename it to something more useful i.e. kata bot-versions
.
I tried to deploy using "kata deploy <name>" (without declaring any version). It suppose to automatically deploy the latest version but instead i got INVALID_VERSION warning.
Should you include usage example instead of just command for this cli? How do I use this with the existing project?
Thanks
Dear Kata Team,
I'm having problems with my LINE Bot, I tried following your documentation and after I set up the webhooks and verified the URL, the bot wouldn't replied to me at all. I would like to know where I messed up by seeing the logs of my chat bot but kata-cli doesn't seem to have that feature (or atleast I didn't know where to look).
Also the emulator works but when I deployed it to LINE it didn't. Can anyone help me with this?
Thank You in advance 👍
cannot login to my account in cli
Dear team,
I found a bug when my bot failed to push, the version still counting up.
Thanks 😄
Please info docs kata cli yang terbaru
Users should not see error tracing and CLI should handle error as many as it can. I was trying to execute kata versions
outside my bot directory, and got this:
$ kata versions
[ERROR] kata-cli/undefined 2017-12-02 20:45:53 : { Error: ENOENT: no such file or directory, open './bot.yml'
at Object.fs.openSync (fs.js:646:18)
at Object.fs.readFileSync (fs.js:551:33)
at Helper.loadYaml (/usr/local/lib/node_modules/kata-cli/lib/components/scripts/helper.js:39:33)
at Helper.getBotId (/usr/local/lib/node_modules/kata-cli/lib/components/scripts/helper.js:103:25)
at Bot.<anonymous> (/usr/local/lib/node_modules/kata-cli/lib/components/bots/bot.js:88:39)
at Generator.next (<anonymous>)
at /usr/local/lib/node_modules/kata-cli/lib/components/bots/bot.js:7:71
at new Promise (<anonymous>)
at __awaiter (/usr/local/lib/node_modules/kata-cli/lib/components/bots/bot.js:3:12)
at Bot.versions (/usr/local/lib/node_modules/kata-cli/lib/components/bots/bot.js:87:16)
at Command.args (/usr/local/lib/node_modules/kata-cli/lib/components/main.js:93:17)
at Command.listener (/usr/local/lib/node_modules/kata-cli/node_modules/commander/index.js:315:8)
at emitTwo (events.js:126:13)
at Command.emit (events.js:214:7)
at Command.parseArgs (/usr/local/lib/node_modules/kata-cli/node_modules/commander/index.js:653:12)
at Command.parse (/usr/local/lib/node_modules/kata-cli/node_modules/commander/index.js:475:21) errno: -2, code: 'ENOENT', syscall: 'open', path: './bot.yml' }
would be nice if CLI returns something like kata versions must be executed in bot directory with bot.yml
or alike.
we need to update the zaun
package version for Platform 3.0
Dear Kata team,
Can we have more detail in error response,
so more clear in error result instead of just "Bad Request"
Thanks
Make CONTRIBUTING.md
that explains how to start contributing to this repo, this is important for ordinary developers outside kata.ai to start contributing. (i.e. Fork the repo, add test, etc.) Example from kubectl
CLI sig group: https://github.com/kubernetes/community/blob/master/sig-cli/CONTRIBUTING.md
though this is too intense, perhaps something much simpler is also acceptable.
All the config (i.e. zaunUrl endpoint) is stored by default in home directory ~/.katajson
, similar to kubectl config view
which shows the current context of kubectl CLI read from ~/.kube/config
.
It would be nice to have similar functionality in Kata CLI, i.e.
$ kata config view
{"current_login":"<username>","token":{ ... }, "zaunUrl":"http://zaun.katalabs.io"}
why when i call an action that has schedule type, the response always 'Maaf terjadi kesalahan pada sistem', i wrote the action code as the documentation said.
Thanks.
Would love to see new version shown as part of CLI result when I patch it:
instead of
$ kata push --rev patch
UPDATED BOT SUCCESSFULLY
would like this one better:
$ kata push --rev patch
UPDATED BOT SUCCESSFULLY WITH VERSION 0.0.5
This error needs to be handled properly
$ kata nl-train
Cannot read property 'map' of null
In my flow, I made a mistake by specifying transition to nextState which doesnt exist
states:
init:
initial: true
transitions:
showTrivia: # showTrivia doesn't exist
condition: "intent == 'trivia'"
when I trigger the flow from kata console
, the error says:
console> text('mau main')
'Cannot read property \'id\' of null'
might be more useful by saying: cannot transit to showTrivia state from init state
. I would envision a proper yaml validator before pushing bot definition to be important for users.
You can only use $include in bot.yml, but not in included yaml file.
gimana caranya call api dalam 1 state lebih dri 1x dan result dri api sebanyak (n)x di push dalem 1 variable misal context.
dan result dalem context itu di display sekali aja
saya cobain 1x berhasil
callAPI: enter: createParamAPI action: - name: removeTimeOut - name: getDataAPI - name: command options: command: finishAPI payload: result: $(result) transitions: showResult: conditon: intent == 'intentAPI' && payload.result mapping: context.rateLists: payload.result.forExRateList context.status: payload.result.statusCode handlingErrorAPI: fallback: true
tapi klo action getDataAPI sya tambah dan commandnya jga, trus saya masukan ke context. result Call api yg pertama di context ga kesimpen
context itu cuma available buat 1x state run ya? klo state looping context reset ya?
ada contoh ga,
thanks
Inspired by kubectl
, executing kata
without any arguments should display the help:
$ kata --help
Usage: kata [options] [command]
Options:
-h, --help output usage information
Commands:
init [options] <bot> <name> [version]
versions
list-bots
push [options]
remove-bot
test [file]
console [options]
deploy <name> [version]
list-deployment
add-channel [options] <name> <channelName>
remove-channel <name> <channelName>
drop <name>
session-get <id> [deploymentId]
session-create [options] [id] [deploymentId]
session-update [options] <id> [deploymentId]
session-delete <id> [deploymentId]
set <prop> <value>
timestamp
create-user [options] <username>
switch <type> [name]
login [options]
logout
whoami
pwd
create-team <name>
add-member [options] <username>
remove-member <username>
currently it returns nothing:
$ kata
Missing the required parameter 'projectId' when calling projectsProjectIdDeploymentVersionsGet
➜ ~ kata list-deployment --help
Usage: list-deployment [options]
Options:
-h, --help output usage information
➜ ~
I want to request a basic example usages for every sub commands. Especially for required parameters like projectId
and [options] path.
Please submit docs for kata console, or URL
since Platform 3.0, we introduce the namespace for our users to accommodate our features. Thus we need to add platform
namespace on login method
Currently kata --help
will display a bunch of commands available to be run without any description and a bit confusing for people who don't have background. Inspired (again) by kubectl
, reformat the help display with short description and useful grouping. Example from kubectl
:
$ kubectl
kubectl controls the Kubernetes cluster manager.
Find more information at https://github.com/kubernetes/kubernetes.
Basic Commands (Beginner):
create Create a resource by filename or stdin
expose Take a replication controller, service, deployment or pod and expose it as a new Kubernetes Service
run Run a particular image on the cluster
run-container Run a particular image on the cluster
set Set specific features on objects
Basic Commands (Intermediate):
get Display one or many resources
explain Documentation of resources
edit Edit a resource on the server
delete Delete resources by filenames, stdin, resources and names, or by resources and label selector
Deploy Commands:
rollout Manage the rollout of a resource
rolling-update Perform a rolling update of the given ReplicationController
rollingupdate Perform a rolling update of the given ReplicationController
scale Set a new size for a Deployment, ReplicaSet, Replication Controller, or Job
resize Set a new size for a Deployment, ReplicaSet, Replication Controller, or Job
autoscale Auto-scale a Deployment, ReplicaSet, or ReplicationController
Cluster Management Commands:
certificate Modify certificate resources.
cluster-info Display cluster info
clusterinfo Display cluster info
top Display Resource (CPU/Memory/Storage) usage.
cordon Mark node as unschedulable
uncordon Mark node as schedulable
drain Drain node in preparation for maintenance
taint Update the taints on one or more nodes
Troubleshooting and Debugging Commands:
describe Show details of a specific resource or group of resources
logs Print the logs for a container in a pod
attach Attach to a running container
exec Execute a command in a container
port-forward Forward one or more local ports to a pod
proxy Run a proxy to the Kubernetes API server
cp Copy files and directories to and from containers.
auth Inspect authorization
Advanced Commands:
apply Apply a configuration to a resource by filename or stdin
patch Update field(s) of a resource using strategic merge patch
replace Replace a resource by filename or stdin
update Replace a resource by filename or stdin
convert Convert config files between different API versions
Settings Commands:
label Update the labels on a resource
annotate Update the annotations on a resource
completion Output shell completion code for the specified shell (bash or zsh)
Other Commands:
api-versions Print the supported API versions on the server, in the form of "group/version"
config Modify kubeconfig files
help Help about any command
plugin Runs a command-line plugin
version Print the client and server version information
Use "kubectl <command> --help" for more information about a given command.
Use "kubectl options" for a list of global command-line options (applies to all commands).
Dear team kata
Tanya dong, klo dlm file bot.yaml section methods
Kan itu akses javascript, klo saya mau akses payload atau data gimana caranya ya dri javascript itu
Whenever I try to change password using pwd
I get "You're not authorized to view this page."
Step by step to replicate this error:
$ kata login
? username: rizqme
? password: *********
Logged in as rizqme
$ kata pwd
? current password: *********
? new password: *********
? retype new password: *********
You're not authorized to view this page.
$ kata pwd
? current password: *********
? new password: *********
? retype new password: *********
You're not authorized to view this page.
Can we have like npm init?
instead of put bot name and desc in single line
Thanks
Similar to #27, kata console error should be handled properly when cannot find bot.yml. Executing kata console
outside bot directory or directory inside (i.e. flows) give error tracing:
$ kata console
[ERROR] kata-cli/undefined 2017-12-06 18:51:27 : { Error: ENOENT: no such file or directory, open './bot.yml'
at Object.fs.openSync (fs.js:646:18)
at Object.fs.readFileSync (fs.js:551:33)
at Helper.loadYaml (/usr/local/lib/node_modules/kata-cli/lib/components/scripts/helper.js:40:33)
at Bot.console (/usr/local/lib/node_modules/kata-cli/lib/components/bots/bot.js:338:37)
at Command.args (/usr/local/lib/node_modules/kata-cli/lib/components/main.js:93:17)
at Command.listener (/usr/local/lib/node_modules/kata-cli/node_modules/commander/index.js:315:8)
at emitTwo (events.js:126:13)
at Command.emit (events.js:214:7)
at Command.parseArgs (/usr/local/lib/node_modules/kata-cli/node_modules/commander/index.js:653:12)
at Command.parse (/usr/local/lib/node_modules/kata-cli/node_modules/commander/index.js:475:21)
at Main.<anonymous> (/usr/local/lib/node_modules/kata-cli/lib/components/main.js:24:23)
at Generator.next (<anonymous>)
at fulfilled (/usr/local/lib/node_modules/kata-cli/lib/components/main.js:4:58)
at <anonymous> errno: -2, code: 'ENOENT', syscall: 'open', path: './bot.yml' }
When executing kata init <bot-id> <bot-name>
, instead of
$ kata init bot-id bot-name
INIT BOT SUCCESSFULLY
I would love to see
$ kata init bot-id bot-name
Initialized <bot-name> successfully with id <bot-id>
or something like that
In order to maintain features and help end users debugging easily, it would be great to add command to show version of kata-cli. Currently there's one command kata versions
which list out bot versions, which is IMO missplaced.
I would expect something like kata version
, to show current version of my CLI, for example:
$ kata version
Kata CLI version 1.0, commit hash XXXX
This will help me if I face problem related to CLI, which really happened to one of the users in Japan. Perhaps this new functionality + some docs on changelogs would help a lot.
Inspired by kubectl
and many more
$ kubectl version
$ go version
$ node version
Hello team,
I need a way to pull specific bot version, so that I can modify it
Thanks 😄
Ideally installing kata-cli
doesn't require typescript, as it should come precompiled.
/kind bug
Creating new bot with Kata Init on arbitrary version produces unhandled error:
$ kata init testbot-1 testbot 0.1
$ kata push
[ERROR] kata-cli/undefined 2017-11-04 18:34:51 : { Error: Bad Request
at Request.callback (/usr/local/lib/node_modules/kata-cli/node_modules/zaun/node_modules/superagent/lib/node/index.js:823:17)
at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/kata-cli/node_modules/zaun/node_modules/superagent/lib/node/index.js:1046:12)
at emitNone (events.js:111:20)
at IncomingMessage.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1056:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickDomainCallback (internal/process/next_tick.js:218:9)
original: null,
response:
Response {
domain: null,
_events: {},
_eventsCount: 0,
_maxListeners: undefined,
res:
IncomingMessage {
_readableState: [Object],
readable: false,
domain: null,
_events: [Object],
_eventsCount: 4,
_maxListeners: undefined,
socket: [Object],
connection: [Object],
httpVersionMajor: 1,
httpVersionMinor: 1,
httpVersion: '1.1',
complete: true,
headers: [Object],
rawHeaders: [Array],
trailers: {},
rawTrailers: [],
upgrade: false,
url: '',
method: null,
statusCode: 400,
statusMessage: 'Bad Request',
client: [Object],
_consuming: true,
_dumped: false,
req: [Object],
text: '{"message":"insert into `bots` (`descriptor`, `id`, `major`, `minor`, `name`, `patch`, `tag`) values (\'{\\\\\\"id\\\\\\":\\\\\\"test-1\\\\\\",\\\\\\"name\\\\\\":\\\\\\"test\\\\\\",\\\\\\"version\\\\\\":\\\\\\"0.1.undefined\\\\\\",\\\\\\"tag\\\\\\":null,\\\\\\"desc\\\\\\":\\\\\\"Bot Description\\\\\\",\\\\\\"flows\\\\\\":{\\\\\\"fallback\\\\\\":{\\\\\\"priority\\\\\\":0,\\\\\\"fallback\\\\\\":true,\\\\\\"intents\\\\\\":{\\\\\\"hi\\\\\\":{\\\\\\"initial\\\\\\":true,\\\\\\"type\\\\\\":\\\\\\"text\\\\\\",\\\\\\"classifier\\\\\\":{\\\\\\"nlu\\\\\\":\\\\\\"confidenceLevel\\\\\\",\\\\\\"match\\\\\\":1}},\\\\\\"dunno\\\\\\":{\\\\\\"fallback\\\\\\":true}},\\\\\\"states\\\\\\":{\\\\\\"init\\\\\\":{\\\\\\"initial\\\\\\":true,\\\\\\"transitions\\\\\\":{\\\\\\"sayHi\\\\\\":{\\\\\\"condition\\\\\\":\\\\\\"intent==\\\\\\\\\\\\\\"hi\\\\\\\\\\\\\\"\\\\\\"},\\\\\\"sorry\\\\\\":{\\\\\\"fallback\\\\\\":true}}},\\\\\\"sayHi\\\\\\":{\\\\\\"end\\\\\\":true,\\\\\\"action\\\\\\":[{\\\\\\"name\\\\\\":\\\\\\"sayHi\\\\\\"}]},\\\\\\"sorry\\\\\\":{\\\\\\"end\\\\\\":true,\\\\\\"action\\\\\\":[{\\\\\\"name\\\\\\":\\\\\\"saySorry\\\\\\"}]}},\\\\\\"actions\\\\\\":{\\\\\\"sayHi\\\\\\":{\\\\\\"type\\\\\\":\\\\\\"text\\\\\\",\\\\\\"options\\\\\\":{\\\\\\"data\\\\\\":\\\\\\"$(config.messages)\\\\\\",\\\\\\"path\\\\\\":\\\\\\"templates\\\\\\",\\\\\\"template\\\\\\":\\\\\\"$[sayHi]\\\\\\"}},\\\\\\"saySorry\\\\\\":{\\\\\\"type\\\\\\":\\\\\\"text\\\\\\",\\\\\\"options\\\\\\":{\\\\\\"data\\\\\\":\\\\\\"$(config.messages)\\\\\\",\\\\\\"path\\\\\\":\\\\\\"templates\\\\\\",\\\\\\"template\\\\\\":\\\\\\"$[saySorry]\\\\\\"}}}}},\\\\\\"nlus\\\\\\":{\\\\\\"confidenceLevel\\\\\\":{\\\\\\"type\\\\\\":\\\\\\"method\\\\\\",\\\\\\"method\\\\\\":\\\\\\"confidenceLevel\\\\\\"}},\\\\\\"methods\\\\\\":{\\\\\\"confidenceLevel(message,context,data,options,config)\\\\\\":{\\\\\\"code\\\\\\":\\\\\\"function confidenceLevel(message, context, data, options, config) { if (message.content === \\\\\\\\\\\\\\"hi\\\\\\\\\\\\\\") return 1; return 0; }\\\\\\",\\\\\\"entry\\\\\\":\\\\\\"confidenceLevel\\\\\\"}},\\\\\\"config\\\\\\":{\\\\\\"messages\\\\\\":{\\\\\\"templates\\\\\\":{\\\\\\"sayHi\\\\\\":\\\\\\"Hi, ada yang bisa saya bantu?\\\\\\",\\\\\\"saySorry\\\\\\":\\\\\\"Maaf, saya tidak mengerti kata-kata anda.\\\\\\"}},\\\\\\"maxRecursion\\\\\\":10}}\', \'test-1\', 0, 1, \'test\', NaN, \'latest\') - ER_BAD_FIELD_ERROR: Unknown column \'NaN\' in \'field list\'","status":"error"}',
read: [Function],
body: [Object] },
request:
Request {
domain: null,
_events: [Object],
_eventsCount: 1,
_maxListeners: undefined,
_agent: false,
_formData: null,
method: 'POST',
url: 'http://zaun.katalabs.io/bots',
header: [Object],
writable: true,
_redirects: 0,
_maxRedirects: 5,
cookies: '',
qs: {},
qsRaw: [],
_redirectList: [],
_streamRequest: false,
_timeout: 0,
_data: [Object],
req: [Object],
protocol: 'http:',
host: 'zaun.katalabs.io',
_callback: [Function],
_timer: [Object],
res: [Object],
response: [Circular],
called: true },
req:
ClientRequest {
domain: null,
_events: [Object],
_eventsCount: 4,
_maxListeners: undefined,
output: [],
outputEncodings: [],
outputCallbacks: [],
outputSize: 0,
writable: true,
_last: true,
upgrading: false,
chunkedEncoding: false,
shouldKeepAlive: false,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
_contentLength: 1198,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
socket: [Object],
connection: [Object],
_header: 'POST /bots HTTP/1.1\r\nHost: zaun.katalabs.io\r\nAccept-Encoding: gzip, deflate\r\nUser-Agent: node-superagent/1.7.1\r\nAuthorization: Bearer 620bb55e-04c2-4425-b038-0a2f3c96c1ad\r\nContent-Type: application/json\r\nAccept: application/json\r\nContent-Length: 1198\r\nConnection: close\r\n\r\n',
_onPendingData: [Function: noopPendingOutput],
agent: [Object],
socketPath: undefined,
timeout: undefined,
method: 'POST',
path: '/bots',
_ended: true,
res: [Object],
aborted: undefined,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
[Symbol(outHeadersKey)]: [Object] },
links: {},
text: '{"message":"insert into `bots` (`descriptor`, `id`, `major`, `minor`, `name`, `patch`, `tag`) values (\'{\\\\\\"id\\\\\\":\\\\\\"test-1\\\\\\",\\\\\\"name\\\\\\":\\\\\\"test\\\\\\",\\\\\\"version\\\\\\":\\\\\\"0.1.undefined\\\\\\",\\\\\\"tag\\\\\\":null,\\\\\\"desc\\\\\\":\\\\\\"Bot Description\\\\\\",\\\\\\"flows\\\\\\":{\\\\\\"fallback\\\\\\":{\\\\\\"priority\\\\\\":0,\\\\\\"fallback\\\\\\":true,\\\\\\"intents\\\\\\":{\\\\\\"hi\\\\\\":{\\\\\\"initial\\\\\\":true,\\\\\\"type\\\\\\":\\\\\\"text\\\\\\",\\\\\\"classifier\\\\\\":{\\\\\\"nlu\\\\\\":\\\\\\"confidenceLevel\\\\\\",\\\\\\"match\\\\\\":1}},\\\\\\"dunno\\\\\\":{\\\\\\"fallback\\\\\\":true}},\\\\\\"states\\\\\\":{\\\\\\"init\\\\\\":{\\\\\\"initial\\\\\\":true,\\\\\\"transitions\\\\\\":{\\\\\\"sayHi\\\\\\":{\\\\\\"condition\\\\\\":\\\\\\"intent==\\\\\\\\\\\\\\"hi\\\\\\\\\\\\\\"\\\\\\"},\\\\\\"sorry\\\\\\":{\\\\\\"fallback\\\\\\":true}}},\\\\\\"sayHi\\\\\\":{\\\\\\"end\\\\\\":true,\\\\\\"action\\\\\\":[{\\\\\\"name\\\\\\":\\\\\\"sayHi\\\\\\"}]},\\\\\\"sorry\\\\\\":{\\\\\\"end\\\\\\":true,\\\\\\"action\\\\\\":[{\\\\\\"name\\\\\\":\\\\\\"saySorry\\\\\\"}]}},\\\\\\"actions\\\\\\":{\\\\\\"sayHi\\\\\\":{\\\\\\"type\\\\\\":\\\\\\"text\\\\\\",\\\\\\"options\\\\\\":{\\\\\\"data\\\\\\":\\\\\\"$(config.messages)\\\\\\",\\\\\\"path\\\\\\":\\\\\\"templates\\\\\\",\\\\\\"template\\\\\\":\\\\\\"$[sayHi]\\\\\\"}},\\\\\\"saySorry\\\\\\":{\\\\\\"type\\\\\\":\\\\\\"text\\\\\\",\\\\\\"options\\\\\\":{\\\\\\"data\\\\\\":\\\\\\"$(config.messages)\\\\\\",\\\\\\"path\\\\\\":\\\\\\"templates\\\\\\",\\\\\\"template\\\\\\":\\\\\\"$[saySorry]\\\\\\"}}}}},\\\\\\"nlus\\\\\\":{\\\\\\"confidenceLevel\\\\\\":{\\\\\\"type\\\\\\":\\\\\\"method\\\\\\",\\\\\\"method\\\\\\":\\\\\\"confidenceLevel\\\\\\"}},\\\\\\"methods\\\\\\":{\\\\\\"confidenceLevel(message,context,data,options,config)\\\\\\":{\\\\\\"code\\\\\\":\\\\\\"function confidenceLevel(message, context, data, options, config) { if (message.content === \\\\\\\\\\\\\\"hi\\\\\\\\\\\\\\") return 1; return 0; }\\\\\\",\\\\\\"entry\\\\\\":\\\\\\"confidenceLevel\\\\\\"}},\\\\\\"config\\\\\\":{\\\\\\"messages\\\\\\":{\\\\\\"templates\\\\\\":{\\\\\\"sayHi\\\\\\":\\\\\\"Hi, ada yang bisa saya bantu?\\\\\\",\\\\\\"saySorry\\\\\\":\\\\\\"Maaf, saya tidak mengerti kata-kata anda.\\\\\\"}},\\\\\\"maxRecursion\\\\\\":10}}\', \'test-1\', 0, 1, \'test\', NaN, \'latest\') - ER_BAD_FIELD_ERROR: Unknown column \'NaN\' in \'field list\'","status":"error"}',
body:
{ message: 'insert into `bots` (`descriptor`, `id`, `major`, `minor`, `name`, `patch`, `tag`) values (\'{\\"id\\":\\"test-1\\",\\"name\\":\\"test\\",\\"version\\":\\"0.1.undefined\\",\\"tag\\":null,\\"desc\\":\\"Bot Description\\",\\"flows\\":{\\"fallback\\":{\\"priority\\":0,\\"fallback\\":true,\\"intents\\":{\\"hi\\":{\\"initial\\":true,\\"type\\":\\"text\\",\\"classifier\\":{\\"nlu\\":\\"confidenceLevel\\",\\"match\\":1}},\\"dunno\\":{\\"fallback\\":true}},\\"states\\":{\\"init\\":{\\"initial\\":true,\\"transitions\\":{\\"sayHi\\":{\\"condition\\":\\"intent==\\\\\\"hi\\\\\\"\\"},\\"sorry\\":{\\"fallback\\":true}}},\\"sayHi\\":{\\"end\\":true,\\"action\\":[{\\"name\\":\\"sayHi\\"}]},\\"sorry\\":{\\"end\\":true,\\"action\\":[{\\"name\\":\\"saySorry\\"}]}},\\"actions\\":{\\"sayHi\\":{\\"type\\":\\"text\\",\\"options\\":{\\"data\\":\\"$(config.messages)\\",\\"path\\":\\"templates\\",\\"template\\":\\"$[sayHi]\\"}},\\"saySorry\\":{\\"type\\":\\"text\\",\\"options\\":{\\"data\\":\\"$(config.messages)\\",\\"path\\":\\"templates\\",\\"template\\":\\"$[saySorry]\\"}}}}},\\"nlus\\":{\\"confidenceLevel\\":{\\"type\\":\\"method\\",\\"method\\":\\"confidenceLevel\\"}},\\"methods\\":{\\"confidenceLevel(message,context,data,options,config)\\":{\\"code\\":\\"function confidenceLevel(message, context, data, options, config) { if (message.content === \\\\\\"hi\\\\\\") return 1; return 0; }\\",\\"entry\\":\\"confidenceLevel\\"}},\\"config\\":{\\"messages\\":{\\"templates\\":{\\"sayHi\\":\\"Hi, ada yang bisa saya bantu?\\",\\"saySorry\\":\\"Maaf, saya tidak mengerti kata-kata anda.\\"}},\\"maxRecursion\\":10}}\', \'test-1\', 0, 1, \'test\', NaN, \'latest\') - ER_BAD_FIELD_ERROR: Unknown column \'NaN\' in \'field list\'',
status: 'error' },
files: {},
buffered: true,
headers:
{ server: 'nginx/1.10.3',
date: 'Sun, 05 Nov 2017 01:34:50 GMT',
'content-type': 'application/json; charset=utf-8',
'content-length': '1910',
connection: 'close',
'x-powered-by': 'Express',
'access-control-allow-origin': '*',
'access-control-allow-credentials': 'true',
etag: 'W/"776-YNMTPtgABwLF+yUw/KKWSQzhrlQ"' },
header:
{ server: 'nginx/1.10.3',
date: 'Sun, 05 Nov 2017 01:34:50 GMT',
'content-type': 'application/json; charset=utf-8',
'content-length': '1910',
connection: 'close',
'x-powered-by': 'Express',
'access-control-allow-origin': '*',
'access-control-allow-credentials': 'true',
etag: 'W/"776-YNMTPtgABwLF+yUw/KKWSQzhrlQ"' },
statusCode: 400,
status: 400,
statusType: 4,
info: false,
ok: false,
redirect: false,
clientError: true,
serverError: false,
error:
{ Error: cannot POST /bots (400)
at Response.toError (/usr/local/lib/node_modules/kata-cli/node_modules/zaun/node_modules/superagent/lib/node/response.js:106:13)
at Response.setStatusProperties (/usr/local/lib/node_modules/kata-cli/node_modules/zaun/node_modules/superagent/lib/node/response.js:183:12)
at new Response (/usr/local/lib/node_modules/kata-cli/node_modules/zaun/node_modules/superagent/lib/node/response.js:42:8)
at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/kata-cli/node_modules/zaun/node_modules/superagent/lib/node/index.js:1042:22)
at emitNone (events.js:111:20)
at IncomingMessage.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1056:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickDomainCallback (internal/process/next_tick.js:218:9)
status: 400,
text: '{"message":"insert into `bots` (`descriptor`, `id`, `major`, `minor`, `name`, `patch`, `tag`) values (\'{\\\\\\"id\\\\\\":\\\\\\"test-1\\\\\\",\\\\\\"name\\\\\\":\\\\\\"test\\\\\\",\\\\\\"version\\\\\\":\\\\\\"0.1.undefined\\\\\\",\\\\\\"tag\\\\\\":null,\\\\\\"desc\\\\\\":\\\\\\"Bot Description\\\\\\",\\\\\\"flows\\\\\\":{\\\\\\"fallback\\\\\\":{\\\\\\"priority\\\\\\":0,\\\\\\"fallback\\\\\\":true,\\\\\\"intents\\\\\\":{\\\\\\"hi\\\\\\":{\\\\\\"initial\\\\\\":true,\\\\\\"type\\\\\\":\\\\\\"text\\\\\\",\\\\\\"classifier\\\\\\":{\\\\\\"nlu\\\\\\":\\\\\\"confidenceLevel\\\\\\",\\\\\\"match\\\\\\":1}},\\\\\\"dunno\\\\\\":{\\\\\\"fallback\\\\\\":true}},\\\\\\"states\\\\\\":{\\\\\\"init\\\\\\":{\\\\\\"initial\\\\\\":true,\\\\\\"transitions\\\\\\":{\\\\\\"sayHi\\\\\\":{\\\\\\"condition\\\\\\":\\\\\\"intent==\\\\\\\\\\\\\\"hi\\\\\\\\\\\\\\"\\\\\\"},\\\\\\"sorry\\\\\\":{\\\\\\"fallback\\\\\\":true}}},\\\\\\"sayHi\\\\\\":{\\\\\\"end\\\\\\":true,\\\\\\"action\\\\\\":[{\\\\\\"name\\\\\\":\\\\\\"sayHi\\\\\\"}]},\\\\\\"sorry\\\\\\":{\\\\\\"end\\\\\\":true,\\\\\\"action\\\\\\":[{\\\\\\"name\\\\\\":\\\\\\"saySorry\\\\\\"}]}},\\\\\\"actions\\\\\\":{\\\\\\"sayHi\\\\\\":{\\\\\\"type\\\\\\":\\\\\\"text\\\\\\",\\\\\\"options\\\\\\":{\\\\\\"data\\\\\\":\\\\\\"$(config.messages)\\\\\\",\\\\\\"path\\\\\\":\\\\\\"templates\\\\\\",\\\\\\"template\\\\\\":\\\\\\"$[sayHi]\\\\\\"}},\\\\\\"saySorry\\\\\\":{\\\\\\"type\\\\\\":\\\\\\"text\\\\\\",\\\\\\"options\\\\\\":{\\\\\\"data\\\\\\":\\\\\\"$(config.messages)\\\\\\",\\\\\\"path\\\\\\":\\\\\\"templates\\\\\\",\\\\\\"template\\\\\\":\\\\\\"$[saySorry]\\\\\\"}}}}},\\\\\\"nlus\\\\\\":{\\\\\\"confidenceLevel\\\\\\":{\\\\\\"type\\\\\\":\\\\\\"method\\\\\\",\\\\\\"method\\\\\\":\\\\\\"confidenceLevel\\\\\\"}},\\\\\\"methods\\\\\\":{\\\\\\"confidenceLevel(message,context,data,options,config)\\\\\\":{\\\\\\"code\\\\\\":\\\\\\"function confidenceLevel(message, context, data, options, config) { if (message.content === \\\\\\\\\\\\\\"hi\\\\\\\\\\\\\\") return 1; return 0; }\\\\\\",\\\\\\"entry\\\\\\":\\\\\\"confidenceLevel\\\\\\"}},\\\\\\"config\\\\\\":{\\\\\\"messages\\\\\\":{\\\\\\"templates\\\\\\":{\\\\\\"sayHi\\\\\\":\\\\\\"Hi, ada yang bisa saya bantu?\\\\\\",\\\\\\"saySorry\\\\\\":\\\\\\"Maaf, saya tidak mengerti kata-kata anda.\\\\\\"}},\\\\\\"maxRecursion\\\\\\":10}}\', \'test-1\', 0, 1, \'test\', NaN, \'latest\') - ER_BAD_FIELD_ERROR: Unknown column \'NaN\' in \'field list\'","status":"error"}',
method: 'POST',
path: '/bots' },
accepted: false,
noContent: false,
badRequest: true,
unauthorized: false,
notAcceptable: false,
forbidden: false,
notFound: false,
charset: 'utf-8',
type: 'application/json',
setEncoding: [Function: bound ],
redirects: [] },
status: 400 }
$ mkdir testbot && cd testbot
$ kata init testbot-1 testbot 0.1
$ kata push
None
Kata CLI Version: CLI 1.0
OS: OSx Sierra 10.12
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.