-
Notifications
You must be signed in to change notification settings - Fork 75
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
虚拟机环境:CentOS Linux release 7.5.1804 (Core),nlp-automl运行报错。 #137
Comments
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
代码:
#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: