openaiwidget插件tokenize接口超时
发布于 7 年前 作者 jinglai 12210 次浏览 来自 问答

// 注册插件
                chatbot.init({
                    appid: constant.ChatbotAppId,
                    openid: openid,
                    success: () => {
                        client = chatbot
                        success(client)
                    },
                    fail,
                })
// 调用语义分析
chatbot.api
                    .nlp('tokenize', {
                        q: txt,
                    })
                    .then((res) => {
                        return res
                    })

// 接口无法访问
curl 'https://openai.weixin.qq.com/miniprogram/openai/api/tokenize' -H 'sec-ch-ua: nwjs 75' -H 'Sec-Fetch-Mode: cors' -H 'Origin: http://127.0.0.1:14690' -H 'X-WECHAT-HOSTSIGN: {"noncestr":"6b065638c4bc5b32e6fb7ec2090ad59d","timestamp":1596507495,"signature":"e1ab062b6df89b7a7f33e49e541a4881fe106132"}' -H 'User-Agent: wechatdevtools appservice port/59209 token/abc37fcfe84074d4697172f6ce7f856d ' -H 'content-type: application/json' -H 'Referer: http://127.0.0.1:14690/appservice/appservice?t=1596507533561?load' -H 'Sec-Fetch-Dest: empty' -H 'authtoken: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJvcGVuaWQiOiJvLTVPMzVhTGRVSG9OMUdET1RUamx4ZGlVUVpFIiwiYmlkIjo0NTI1MiwiYXBwX2tleSI6Im5aYndSZFpIOEFENTE4b01FSENjTlpoTElHT2pXdCIsImlhdCI6MTU5NjUwNzQ5NywiZXhwIjoxNTk5MDk5NDk3fQ.OREDQbn782-YmsbASCduKp79Bk2DWdJ-S_KpZA3bK4o' -H 'Sec-Fetch-Site: cross-site' --data-binary '{"q":"给你推荐一首歌"}' --compressed
回到顶部