Skip to content

Commit

Permalink
Update API RunHotTopicChat: add param messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
sdk-team committed Dec 11, 2024
1 parent 72e7e04 commit 3ecba53
Show file tree
Hide file tree
Showing 5 changed files with 124 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2024-12-11 Version: 2.0.1
- Update API RunHotTopicChat: add param messages.


2024-12-05 Version: 2.0.0
- Delete API RunCommentGeneration.
- Update API RunHotTopicChat: update response param.
Expand Down
25 changes: 25 additions & 0 deletions src/Models/RunHotTopicChatRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace AlibabaCloud\SDK\QuanMiaoLightApp\V20240801\Models;

use AlibabaCloud\SDK\QuanMiaoLightApp\V20240801\Models\RunHotTopicChatRequest\messages;
use AlibabaCloud\SDK\QuanMiaoLightApp\V20240801\Models\RunHotTopicChatRequest\stepForBroadcastContentConfig;
use AlibabaCloud\Tea\Model;

Expand Down Expand Up @@ -38,6 +39,11 @@ class RunHotTopicChatRequest extends Model
*/
public $imageCount;

/**
* @var messages[]
*/
public $messages;

/**
* @example xx
*
Expand Down Expand Up @@ -81,6 +87,7 @@ class RunHotTopicChatRequest extends Model
'hotTopicVersion' => 'hotTopicVersion',
'hotTopics' => 'hotTopics',
'imageCount' => 'imageCount',
'messages' => 'messages',
'modelCustomPromptTemplate' => 'modelCustomPromptTemplate',
'modelId' => 'modelId',
'originalSessionId' => 'originalSessionId',
Expand Down Expand Up @@ -111,6 +118,15 @@ public function toMap()
if (null !== $this->imageCount) {
$res['imageCount'] = $this->imageCount;
}
if (null !== $this->messages) {
$res['messages'] = [];
if (null !== $this->messages && \is_array($this->messages)) {
$n = 0;
foreach ($this->messages as $item) {
$res['messages'][$n++] = null !== $item ? $item->toMap() : $item;
}
}
}
if (null !== $this->modelCustomPromptTemplate) {
$res['modelCustomPromptTemplate'] = $this->modelCustomPromptTemplate;
}
Expand Down Expand Up @@ -160,6 +176,15 @@ public static function fromMap($map = [])
if (isset($map['imageCount'])) {
$model->imageCount = $map['imageCount'];
}
if (isset($map['messages'])) {
if (!empty($map['messages'])) {
$model->messages = [];
$n = 0;
foreach ($map['messages'] as $item) {
$model->messages[$n++] = null !== $item ? messages::fromMap($item) : $item;
}
}
}
if (isset($map['modelCustomPromptTemplate'])) {
$model->modelCustomPromptTemplate = $map['modelCustomPromptTemplate'];
}
Expand Down
77 changes: 77 additions & 0 deletions src/Models/RunHotTopicChatRequest/messages.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<?php

// This file is auto-generated, don't edit it. Thanks.

namespace AlibabaCloud\SDK\QuanMiaoLightApp\V20240801\Models\RunHotTopicChatRequest;

use AlibabaCloud\Tea\Model;

class messages extends Model
{
/**
* @example xxx
*
* @var string
*/
public $content;

/**
* @example 2024-12-10 18:51:29
*
* @var string
*/
public $createTime;

/**
* @example user
*
* @var string
*/
public $role;
protected $_name = [
'content' => 'content',
'createTime' => 'createTime',
'role' => 'role',
];

public function validate()
{
}

public function toMap()
{
$res = [];
if (null !== $this->content) {
$res['content'] = $this->content;
}
if (null !== $this->createTime) {
$res['createTime'] = $this->createTime;
}
if (null !== $this->role) {
$res['role'] = $this->role;
}

return $res;
}

/**
* @param array $map
*
* @return messages
*/
public static function fromMap($map = [])
{
$model = new self();
if (isset($map['content'])) {
$model->content = $map['content'];
}
if (isset($map['createTime'])) {
$model->createTime = $map['createTime'];
}
if (isset($map['role'])) {
$model->role = $map['role'];
}

return $model;
}
}
12 changes: 12 additions & 0 deletions src/Models/RunHotTopicChatShrinkRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ class RunHotTopicChatShrinkRequest extends Model
*/
public $imageCount;

/**
* @var string
*/
public $messagesShrink;

/**
* @example xx
*
Expand Down Expand Up @@ -80,6 +85,7 @@ class RunHotTopicChatShrinkRequest extends Model
'hotTopicVersion' => 'hotTopicVersion',
'hotTopicsShrink' => 'hotTopics',
'imageCount' => 'imageCount',
'messagesShrink' => 'messages',
'modelCustomPromptTemplate' => 'modelCustomPromptTemplate',
'modelId' => 'modelId',
'originalSessionId' => 'originalSessionId',
Expand Down Expand Up @@ -110,6 +116,9 @@ public function toMap()
if (null !== $this->imageCount) {
$res['imageCount'] = $this->imageCount;
}
if (null !== $this->messagesShrink) {
$res['messages'] = $this->messagesShrink;
}
if (null !== $this->modelCustomPromptTemplate) {
$res['modelCustomPromptTemplate'] = $this->modelCustomPromptTemplate;
}
Expand Down Expand Up @@ -155,6 +164,9 @@ public static function fromMap($map = [])
if (isset($map['imageCount'])) {
$model->imageCount = $map['imageCount'];
}
if (isset($map['messages'])) {
$model->messagesShrink = $map['messages'];
}
if (isset($map['modelCustomPromptTemplate'])) {
$model->modelCustomPromptTemplate = $map['modelCustomPromptTemplate'];
}
Expand Down
6 changes: 6 additions & 0 deletions src/QuanMiaoLightApp.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,9 @@ public function runHotTopicChatWithOptions($workspaceId, $tmpReq, $headers, $run
if (!Utils::isUnset($tmpReq->hotTopics)) {
$request->hotTopicsShrink = OpenApiUtilClient::arrayToStringWithSpecifiedStyle($tmpReq->hotTopics, 'hotTopics', 'json');
}
if (!Utils::isUnset($tmpReq->messages)) {
$request->messagesShrink = OpenApiUtilClient::arrayToStringWithSpecifiedStyle($tmpReq->messages, 'messages', 'json');
}
if (!Utils::isUnset($tmpReq->stepForBroadcastContentConfig)) {
$request->stepForBroadcastContentConfigShrink = OpenApiUtilClient::arrayToStringWithSpecifiedStyle($tmpReq->stepForBroadcastContentConfig, 'stepForBroadcastContentConfig', 'json');
}
Expand All @@ -226,6 +229,9 @@ public function runHotTopicChatWithOptions($workspaceId, $tmpReq, $headers, $run
if (!Utils::isUnset($request->imageCount)) {
$body['imageCount'] = $request->imageCount;
}
if (!Utils::isUnset($request->messagesShrink)) {
$body['messages'] = $request->messagesShrink;
}
if (!Utils::isUnset($request->modelCustomPromptTemplate)) {
$body['modelCustomPromptTemplate'] = $request->modelCustomPromptTemplate;
}
Expand Down

0 comments on commit 3ecba53

Please sign in to comment.