aliyun / aliyun/aliyun-openapi-cpp-sdk
虚拟机环境:CentOS Linux release 7.5.1804 (Core),nlp-automl运行报错。
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 104
- Forks
- 75
- PR merge metrics
- No merged PRs in 30d
Description
代码:
#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;
}
报错信息:

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the supplied C++ example and reproduce the nlp-automl call in the reported CentOS Linux 7.5.1804 environment, using the error shown in the linked screenshot as the initial symptom. Done means identifying the cause and confirming a successful request or documenting the required compatibility change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- centos, cpp
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100