You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
cumtqiao
changed the title
虚拟机版本:CentOS Linux release 7.5.1804 (Core),nlp-automl运行报错。
虚拟机环境:CentOS Linux release 7.5.1804 (Core),nlp-automl运行报错。
Nov 29, 2021
代码:
#include
#include <alibabacloud/core/AlibabaCloud.h>
#include <alibabacloud/nlp-automl/Nlp_automlClient.h>
using namespace AlibabaCloud;
using namespace AlibabaCloud::Nlp_automl;
int main(int argc, char** argv) {
// 初始化 SDK
AlibabaCloud::InitializeSdk();
// 配置 nlp_automl 实例
ClientConfiguration configuration("");
Nlp_automlClient client("", "", configuration);
// 创建API请求并设置参数
Model::GetPredictResultRequest request;
request.setModelId(10281);
request.setContent("中华人民共和国解放军");
auto outcome = client.getPredictResult(request);
if (!outcome.isSuccess()) {
// 异常处理
std::cout << outcome.error().errorCode() << std::endl;
AlibabaCloud::ShutdownSdk();
return -1;
}
std::cout << "totalCount: " << outcome.result().getContent() << std::endl;
// 关闭 SDK
AlibabaCloud::ShutdownSdk();
return 0;
}
报错信息:
The text was updated successfully, but these errors were encountered: