将curl请求传递给RASA NLU

时间:2018-01-15 11:24:20

标签: python curl rasa-nlu

当我尝试向服务器发送查询时,它返回此错误:

查询代码是:

curl -X POST localhost:5000/parse -d '{"q":"I am looking for Chinese food"}' | python -m json.tool 

File "C:\User\AppData\Local\Programs\Python\Python36\lib\site-packages\simplejson\decoder.py", line 400, in raw_decode
            return self.scan_once(s, idx=_w(s, idx).end())
        simplejson.scanner.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

我只是按照here的说明进行操作。

1 个答案:

答案 0 :(得分:0)

尝试添加此内容:

const myclassnamearray = await page.evaluate(() => [...document.querySelector('.lang1').classList]);

console.log(myclassnamearray[0]); // Returns "central-featured-lang"
console.log(myclassnamearray[1]); // Returns "lang1"

服务器将识别以JSON发送的数据

相关问题