We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
版本:3.0.1031
$cred = new Credential($this->secretId, $this->secretKey); // 实例化一个http选项,可选的,没有特殊需求可以跳过 $httpProfile = new HttpProfile(); $httpProfile->setEndpoint("hunyuan.tencentcloudapi.com"); // 实例化一个client选项,可选的,没有特殊需求可以跳过 $clientProfile = new ClientProfile(); $clientProfile->setHttpProfile($httpProfile); // 实例化要请求产品的client对象,clientProfile是可选的 $client = new HunyuanClient($cred, "", $clientProfile); // 实例化一个请求对象,每个接口都会对应一个request对象 $params = [ "Messages" => [ [ 'Role' => 'user', 'Content' => '你是谁?' ], ], "TopP" => 0, "Temperature" => 0, ]; $req = new ChatProRequest(); $req->fromJsonString(json_encode($params)); // 返回的resp是一个GetTokenCountResponse的实例,与请求对象对应 $resp = $client->ChatPro($req); return $resp->toJsonString();
返回的$resp中所有对象都是null值,也没有异常抛出,请问是调用方式有问题吗?
The text was updated successfully, but these errors were encountered:
混元接口采用了非json的协议,php还未支持,所以应该是未解析出返回。
Sorry, something went wrong.
No branches or pull requests
版本:3.0.1031
返回的$resp中所有对象都是null值,也没有异常抛出,请问是调用方式有问题吗?
The text was updated successfully, but these errors were encountered: