Skip to content
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

混元大模型php返回数据被截断 #120

Open
liaoque opened this issue Feb 28, 2024 · 2 comments
Open

混元大模型php返回数据被截断 #120

liaoque opened this issue Feb 28, 2024 · 2 comments

Comments

@liaoque
Copy link

liaoque commented Feb 28, 2024

  1. 返回数据被截断
    文件 : tencentcloud\tencentcloud-sdk-php\src\TencentCloud\Common\Http\HttpConnection.php

 public function postRequestRaw($uri = '', $headers = [], $body = '')
  {
      $options  = $this->getOptions();
      if ($headers) {
          $options["headers"] = $headers;
      }
      if ($body) {
          $options["body"] = $body;
      }
      $options[RequestOptions::STREAM] = true;  // 加上这个选项才不会截断

      return $this->client->post($uri, $options);
  }
  1. 使用该sdk后, 报错被禁用,如代码错误,会导致请求会卡死, 目前还未找到问题, 也请尽快修复
@huatuoliu
Copy link
Contributor

是使用的这个示例吗?
tencentcloud-sdk-php\examples\hunyuan\v20230901\ChatStd.php

@liaoque
Copy link
Author

liaoque commented Feb 29, 2024

对,就是这个例子

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants