From 91ace0ccd8d6fa8bf2a7141b4e553dc5920d8722 Mon Sep 17 00:00:00 2001 From: sdk-team Date: Thu, 26 Dec 2024 16:29:07 +0000 Subject: [PATCH] Support API GenerateOutputFormat. --- ChangeLog.md | 5 + src/Models/GenerateOutputFormatRequest.php | 118 ++++++++++++++ .../GenerateOutputFormatRequest/tags.php | 63 ++++++++ src/Models/GenerateOutputFormatResponse.php | 71 +++++++++ .../GenerateOutputFormatResponseBody.php | 120 ++++++++++++++ .../GenerateOutputFormatResponseBody/data.php | 47 ++++++ .../GenerateOutputFormatShrinkRequest.php | 105 ++++++++++++ src/Models/RunTagMiningAnalysisRequest.php | 146 +++++++++++++++++ .../RunTagMiningAnalysisRequest/tags.php | 63 ++++++++ src/Models/RunTagMiningAnalysisResponse.php | 71 +++++++++ .../RunTagMiningAnalysisResponseBody.php | 77 +++++++++ .../header.php | 119 ++++++++++++++ .../payload.php | 61 +++++++ .../payload/output.php | 47 ++++++ .../payload/usage.php | 77 +++++++++ .../RunTagMiningAnalysisShrinkRequest.php | 133 ++++++++++++++++ src/QuanMiaoLightApp.php | 150 ++++++++++++++++++ 17 files changed, 1473 insertions(+) create mode 100644 src/Models/GenerateOutputFormatRequest.php create mode 100644 src/Models/GenerateOutputFormatRequest/tags.php create mode 100644 src/Models/GenerateOutputFormatResponse.php create mode 100644 src/Models/GenerateOutputFormatResponseBody.php create mode 100644 src/Models/GenerateOutputFormatResponseBody/data.php create mode 100644 src/Models/GenerateOutputFormatShrinkRequest.php create mode 100644 src/Models/RunTagMiningAnalysisRequest.php create mode 100644 src/Models/RunTagMiningAnalysisRequest/tags.php create mode 100644 src/Models/RunTagMiningAnalysisResponse.php create mode 100644 src/Models/RunTagMiningAnalysisResponseBody.php create mode 100644 src/Models/RunTagMiningAnalysisResponseBody/header.php create mode 100644 src/Models/RunTagMiningAnalysisResponseBody/payload.php create mode 100644 src/Models/RunTagMiningAnalysisResponseBody/payload/output.php create mode 100644 src/Models/RunTagMiningAnalysisResponseBody/payload/usage.php create mode 100644 src/Models/RunTagMiningAnalysisShrinkRequest.php diff --git a/ChangeLog.md b/ChangeLog.md index 1ee9338..b080eaf 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,3 +1,8 @@ +2024-12-26 Version: 2.1.0 +- Support API GenerateOutputFormat. +- Support API RunTagMiningAnalysis. + + 2024-12-11 Version: 2.0.1 - Update API RunHotTopicChat: add param messages. diff --git a/src/Models/GenerateOutputFormatRequest.php b/src/Models/GenerateOutputFormatRequest.php new file mode 100644 index 0000000..3fe30fe --- /dev/null +++ b/src/Models/GenerateOutputFormatRequest.php @@ -0,0 +1,118 @@ + 'businessType', + 'content' => 'content', + 'extraInfo' => 'extraInfo', + 'tags' => 'tags', + 'taskDescription' => 'taskDescription', + ]; + + public function validate() + { + } + + public function toMap() + { + $res = []; + if (null !== $this->businessType) { + $res['businessType'] = $this->businessType; + } + if (null !== $this->content) { + $res['content'] = $this->content; + } + if (null !== $this->extraInfo) { + $res['extraInfo'] = $this->extraInfo; + } + if (null !== $this->tags) { + $res['tags'] = []; + if (null !== $this->tags && \is_array($this->tags)) { + $n = 0; + foreach ($this->tags as $item) { + $res['tags'][$n++] = null !== $item ? $item->toMap() : $item; + } + } + } + if (null !== $this->taskDescription) { + $res['taskDescription'] = $this->taskDescription; + } + + return $res; + } + + /** + * @param array $map + * + * @return GenerateOutputFormatRequest + */ + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['businessType'])) { + $model->businessType = $map['businessType']; + } + if (isset($map['content'])) { + $model->content = $map['content']; + } + if (isset($map['extraInfo'])) { + $model->extraInfo = $map['extraInfo']; + } + if (isset($map['tags'])) { + if (!empty($map['tags'])) { + $model->tags = []; + $n = 0; + foreach ($map['tags'] as $item) { + $model->tags[$n++] = null !== $item ? tags::fromMap($item) : $item; + } + } + } + if (isset($map['taskDescription'])) { + $model->taskDescription = $map['taskDescription']; + } + + return $model; + } +} diff --git a/src/Models/GenerateOutputFormatRequest/tags.php b/src/Models/GenerateOutputFormatRequest/tags.php new file mode 100644 index 0000000..2cb8868 --- /dev/null +++ b/src/Models/GenerateOutputFormatRequest/tags.php @@ -0,0 +1,63 @@ + 'tagDefinePrompt', + 'tagName' => 'tagName', + ]; + + public function validate() + { + } + + public function toMap() + { + $res = []; + if (null !== $this->tagDefinePrompt) { + $res['tagDefinePrompt'] = $this->tagDefinePrompt; + } + if (null !== $this->tagName) { + $res['tagName'] = $this->tagName; + } + + return $res; + } + + /** + * @param array $map + * + * @return tags + */ + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['tagDefinePrompt'])) { + $model->tagDefinePrompt = $map['tagDefinePrompt']; + } + if (isset($map['tagName'])) { + $model->tagName = $map['tagName']; + } + + return $model; + } +} diff --git a/src/Models/GenerateOutputFormatResponse.php b/src/Models/GenerateOutputFormatResponse.php new file mode 100644 index 0000000..5e949c3 --- /dev/null +++ b/src/Models/GenerateOutputFormatResponse.php @@ -0,0 +1,71 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + + public function validate() + { + } + + public function toMap() + { + $res = []; + if (null !== $this->headers) { + $res['headers'] = $this->headers; + } + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toMap() : null; + } + + return $res; + } + + /** + * @param array $map + * + * @return GenerateOutputFormatResponse + */ + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['headers'])) { + $model->headers = $map['headers']; + } + if (isset($map['statusCode'])) { + $model->statusCode = $map['statusCode']; + } + if (isset($map['body'])) { + $model->body = GenerateOutputFormatResponseBody::fromMap($map['body']); + } + + return $model; + } +} diff --git a/src/Models/GenerateOutputFormatResponseBody.php b/src/Models/GenerateOutputFormatResponseBody.php new file mode 100644 index 0000000..701f479 --- /dev/null +++ b/src/Models/GenerateOutputFormatResponseBody.php @@ -0,0 +1,120 @@ + 'code', + 'data' => 'data', + 'httpStatusCode' => 'httpStatusCode', + 'message' => 'message', + 'requestId' => 'requestId', + 'success' => 'success', + ]; + + public function validate() + { + } + + public function toMap() + { + $res = []; + if (null !== $this->code) { + $res['code'] = $this->code; + } + if (null !== $this->data) { + $res['data'] = null !== $this->data ? $this->data->toMap() : null; + } + if (null !== $this->httpStatusCode) { + $res['httpStatusCode'] = $this->httpStatusCode; + } + if (null !== $this->message) { + $res['message'] = $this->message; + } + if (null !== $this->requestId) { + $res['requestId'] = $this->requestId; + } + if (null !== $this->success) { + $res['success'] = $this->success; + } + + return $res; + } + + /** + * @param array $map + * + * @return GenerateOutputFormatResponseBody + */ + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['code'])) { + $model->code = $map['code']; + } + if (isset($map['data'])) { + $model->data = data::fromMap($map['data']); + } + if (isset($map['httpStatusCode'])) { + $model->httpStatusCode = $map['httpStatusCode']; + } + if (isset($map['message'])) { + $model->message = $map['message']; + } + if (isset($map['requestId'])) { + $model->requestId = $map['requestId']; + } + if (isset($map['success'])) { + $model->success = $map['success']; + } + + return $model; + } +} diff --git a/src/Models/GenerateOutputFormatResponseBody/data.php b/src/Models/GenerateOutputFormatResponseBody/data.php new file mode 100644 index 0000000..4e78754 --- /dev/null +++ b/src/Models/GenerateOutputFormatResponseBody/data.php @@ -0,0 +1,47 @@ + 'outputFormat', + ]; + + public function validate() + { + } + + public function toMap() + { + $res = []; + if (null !== $this->outputFormat) { + $res['outputFormat'] = $this->outputFormat; + } + + return $res; + } + + /** + * @param array $map + * + * @return data + */ + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['outputFormat'])) { + $model->outputFormat = $map['outputFormat']; + } + + return $model; + } +} diff --git a/src/Models/GenerateOutputFormatShrinkRequest.php b/src/Models/GenerateOutputFormatShrinkRequest.php new file mode 100644 index 0000000..20717cf --- /dev/null +++ b/src/Models/GenerateOutputFormatShrinkRequest.php @@ -0,0 +1,105 @@ + 'businessType', + 'content' => 'content', + 'extraInfo' => 'extraInfo', + 'tagsShrink' => 'tags', + 'taskDescription' => 'taskDescription', + ]; + + public function validate() + { + } + + public function toMap() + { + $res = []; + if (null !== $this->businessType) { + $res['businessType'] = $this->businessType; + } + if (null !== $this->content) { + $res['content'] = $this->content; + } + if (null !== $this->extraInfo) { + $res['extraInfo'] = $this->extraInfo; + } + if (null !== $this->tagsShrink) { + $res['tags'] = $this->tagsShrink; + } + if (null !== $this->taskDescription) { + $res['taskDescription'] = $this->taskDescription; + } + + return $res; + } + + /** + * @param array $map + * + * @return GenerateOutputFormatShrinkRequest + */ + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['businessType'])) { + $model->businessType = $map['businessType']; + } + if (isset($map['content'])) { + $model->content = $map['content']; + } + if (isset($map['extraInfo'])) { + $model->extraInfo = $map['extraInfo']; + } + if (isset($map['tags'])) { + $model->tagsShrink = $map['tags']; + } + if (isset($map['taskDescription'])) { + $model->taskDescription = $map['taskDescription']; + } + + return $model; + } +} diff --git a/src/Models/RunTagMiningAnalysisRequest.php b/src/Models/RunTagMiningAnalysisRequest.php new file mode 100644 index 0000000..f20edfd --- /dev/null +++ b/src/Models/RunTagMiningAnalysisRequest.php @@ -0,0 +1,146 @@ + 'businessType', + 'content' => 'content', + 'extraInfo' => 'extraInfo', + 'modelId' => 'modelId', + 'outputFormat' => 'outputFormat', + 'tags' => 'tags', + 'taskDescription' => 'taskDescription', + ]; + + public function validate() + { + } + + public function toMap() + { + $res = []; + if (null !== $this->businessType) { + $res['businessType'] = $this->businessType; + } + if (null !== $this->content) { + $res['content'] = $this->content; + } + if (null !== $this->extraInfo) { + $res['extraInfo'] = $this->extraInfo; + } + if (null !== $this->modelId) { + $res['modelId'] = $this->modelId; + } + if (null !== $this->outputFormat) { + $res['outputFormat'] = $this->outputFormat; + } + if (null !== $this->tags) { + $res['tags'] = []; + if (null !== $this->tags && \is_array($this->tags)) { + $n = 0; + foreach ($this->tags as $item) { + $res['tags'][$n++] = null !== $item ? $item->toMap() : $item; + } + } + } + if (null !== $this->taskDescription) { + $res['taskDescription'] = $this->taskDescription; + } + + return $res; + } + + /** + * @param array $map + * + * @return RunTagMiningAnalysisRequest + */ + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['businessType'])) { + $model->businessType = $map['businessType']; + } + if (isset($map['content'])) { + $model->content = $map['content']; + } + if (isset($map['extraInfo'])) { + $model->extraInfo = $map['extraInfo']; + } + if (isset($map['modelId'])) { + $model->modelId = $map['modelId']; + } + if (isset($map['outputFormat'])) { + $model->outputFormat = $map['outputFormat']; + } + if (isset($map['tags'])) { + if (!empty($map['tags'])) { + $model->tags = []; + $n = 0; + foreach ($map['tags'] as $item) { + $model->tags[$n++] = null !== $item ? tags::fromMap($item) : $item; + } + } + } + if (isset($map['taskDescription'])) { + $model->taskDescription = $map['taskDescription']; + } + + return $model; + } +} diff --git a/src/Models/RunTagMiningAnalysisRequest/tags.php b/src/Models/RunTagMiningAnalysisRequest/tags.php new file mode 100644 index 0000000..0c08d60 --- /dev/null +++ b/src/Models/RunTagMiningAnalysisRequest/tags.php @@ -0,0 +1,63 @@ + 'tagDefinePrompt', + 'tagName' => 'tagName', + ]; + + public function validate() + { + } + + public function toMap() + { + $res = []; + if (null !== $this->tagDefinePrompt) { + $res['tagDefinePrompt'] = $this->tagDefinePrompt; + } + if (null !== $this->tagName) { + $res['tagName'] = $this->tagName; + } + + return $res; + } + + /** + * @param array $map + * + * @return tags + */ + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['tagDefinePrompt'])) { + $model->tagDefinePrompt = $map['tagDefinePrompt']; + } + if (isset($map['tagName'])) { + $model->tagName = $map['tagName']; + } + + return $model; + } +} diff --git a/src/Models/RunTagMiningAnalysisResponse.php b/src/Models/RunTagMiningAnalysisResponse.php new file mode 100644 index 0000000..0b5d9ff --- /dev/null +++ b/src/Models/RunTagMiningAnalysisResponse.php @@ -0,0 +1,71 @@ + 'headers', + 'statusCode' => 'statusCode', + 'body' => 'body', + ]; + + public function validate() + { + } + + public function toMap() + { + $res = []; + if (null !== $this->headers) { + $res['headers'] = $this->headers; + } + if (null !== $this->statusCode) { + $res['statusCode'] = $this->statusCode; + } + if (null !== $this->body) { + $res['body'] = null !== $this->body ? $this->body->toMap() : null; + } + + return $res; + } + + /** + * @param array $map + * + * @return RunTagMiningAnalysisResponse + */ + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['headers'])) { + $model->headers = $map['headers']; + } + if (isset($map['statusCode'])) { + $model->statusCode = $map['statusCode']; + } + if (isset($map['body'])) { + $model->body = RunTagMiningAnalysisResponseBody::fromMap($map['body']); + } + + return $model; + } +} diff --git a/src/Models/RunTagMiningAnalysisResponseBody.php b/src/Models/RunTagMiningAnalysisResponseBody.php new file mode 100644 index 0000000..089511c --- /dev/null +++ b/src/Models/RunTagMiningAnalysisResponseBody.php @@ -0,0 +1,77 @@ + 'header', + 'payload' => 'payload', + 'requestId' => 'requestId', + ]; + + public function validate() + { + } + + public function toMap() + { + $res = []; + if (null !== $this->header) { + $res['header'] = null !== $this->header ? $this->header->toMap() : null; + } + if (null !== $this->payload) { + $res['payload'] = null !== $this->payload ? $this->payload->toMap() : null; + } + if (null !== $this->requestId) { + $res['requestId'] = $this->requestId; + } + + return $res; + } + + /** + * @param array $map + * + * @return RunTagMiningAnalysisResponseBody + */ + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['header'])) { + $model->header = header::fromMap($map['header']); + } + if (isset($map['payload'])) { + $model->payload = payload::fromMap($map['payload']); + } + if (isset($map['requestId'])) { + $model->requestId = $map['requestId']; + } + + return $model; + } +} diff --git a/src/Models/RunTagMiningAnalysisResponseBody/header.php b/src/Models/RunTagMiningAnalysisResponseBody/header.php new file mode 100644 index 0000000..c701e97 --- /dev/null +++ b/src/Models/RunTagMiningAnalysisResponseBody/header.php @@ -0,0 +1,119 @@ + 'errorCode', + 'errorMessage' => 'errorMessage', + 'event' => 'event', + 'sessionId' => 'sessionId', + 'taskId' => 'taskId', + 'traceId' => 'traceId', + ]; + + public function validate() + { + } + + public function toMap() + { + $res = []; + if (null !== $this->errorCode) { + $res['errorCode'] = $this->errorCode; + } + if (null !== $this->errorMessage) { + $res['errorMessage'] = $this->errorMessage; + } + if (null !== $this->event) { + $res['event'] = $this->event; + } + if (null !== $this->sessionId) { + $res['sessionId'] = $this->sessionId; + } + if (null !== $this->taskId) { + $res['taskId'] = $this->taskId; + } + if (null !== $this->traceId) { + $res['traceId'] = $this->traceId; + } + + return $res; + } + + /** + * @param array $map + * + * @return header + */ + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['errorCode'])) { + $model->errorCode = $map['errorCode']; + } + if (isset($map['errorMessage'])) { + $model->errorMessage = $map['errorMessage']; + } + if (isset($map['event'])) { + $model->event = $map['event']; + } + if (isset($map['sessionId'])) { + $model->sessionId = $map['sessionId']; + } + if (isset($map['taskId'])) { + $model->taskId = $map['taskId']; + } + if (isset($map['traceId'])) { + $model->traceId = $map['traceId']; + } + + return $model; + } +} diff --git a/src/Models/RunTagMiningAnalysisResponseBody/payload.php b/src/Models/RunTagMiningAnalysisResponseBody/payload.php new file mode 100644 index 0000000..5181ab5 --- /dev/null +++ b/src/Models/RunTagMiningAnalysisResponseBody/payload.php @@ -0,0 +1,61 @@ + 'output', + 'usage' => 'usage', + ]; + + public function validate() + { + } + + public function toMap() + { + $res = []; + if (null !== $this->output) { + $res['output'] = null !== $this->output ? $this->output->toMap() : null; + } + if (null !== $this->usage) { + $res['usage'] = null !== $this->usage ? $this->usage->toMap() : null; + } + + return $res; + } + + /** + * @param array $map + * + * @return payload + */ + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['output'])) { + $model->output = output::fromMap($map['output']); + } + if (isset($map['usage'])) { + $model->usage = usage::fromMap($map['usage']); + } + + return $model; + } +} diff --git a/src/Models/RunTagMiningAnalysisResponseBody/payload/output.php b/src/Models/RunTagMiningAnalysisResponseBody/payload/output.php new file mode 100644 index 0000000..9ce244d --- /dev/null +++ b/src/Models/RunTagMiningAnalysisResponseBody/payload/output.php @@ -0,0 +1,47 @@ + 'text', + ]; + + public function validate() + { + } + + public function toMap() + { + $res = []; + if (null !== $this->text) { + $res['text'] = $this->text; + } + + return $res; + } + + /** + * @param array $map + * + * @return output + */ + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['text'])) { + $model->text = $map['text']; + } + + return $model; + } +} diff --git a/src/Models/RunTagMiningAnalysisResponseBody/payload/usage.php b/src/Models/RunTagMiningAnalysisResponseBody/payload/usage.php new file mode 100644 index 0000000..29b5fb4 --- /dev/null +++ b/src/Models/RunTagMiningAnalysisResponseBody/payload/usage.php @@ -0,0 +1,77 @@ + 'inputTokens', + 'outputTokens' => 'outputTokens', + 'totalTokens' => 'totalTokens', + ]; + + public function validate() + { + } + + public function toMap() + { + $res = []; + if (null !== $this->inputTokens) { + $res['inputTokens'] = $this->inputTokens; + } + if (null !== $this->outputTokens) { + $res['outputTokens'] = $this->outputTokens; + } + if (null !== $this->totalTokens) { + $res['totalTokens'] = $this->totalTokens; + } + + return $res; + } + + /** + * @param array $map + * + * @return usage + */ + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['inputTokens'])) { + $model->inputTokens = $map['inputTokens']; + } + if (isset($map['outputTokens'])) { + $model->outputTokens = $map['outputTokens']; + } + if (isset($map['totalTokens'])) { + $model->totalTokens = $map['totalTokens']; + } + + return $model; + } +} diff --git a/src/Models/RunTagMiningAnalysisShrinkRequest.php b/src/Models/RunTagMiningAnalysisShrinkRequest.php new file mode 100644 index 0000000..6fcb416 --- /dev/null +++ b/src/Models/RunTagMiningAnalysisShrinkRequest.php @@ -0,0 +1,133 @@ + 'businessType', + 'content' => 'content', + 'extraInfo' => 'extraInfo', + 'modelId' => 'modelId', + 'outputFormat' => 'outputFormat', + 'tagsShrink' => 'tags', + 'taskDescription' => 'taskDescription', + ]; + + public function validate() + { + } + + public function toMap() + { + $res = []; + if (null !== $this->businessType) { + $res['businessType'] = $this->businessType; + } + if (null !== $this->content) { + $res['content'] = $this->content; + } + if (null !== $this->extraInfo) { + $res['extraInfo'] = $this->extraInfo; + } + if (null !== $this->modelId) { + $res['modelId'] = $this->modelId; + } + if (null !== $this->outputFormat) { + $res['outputFormat'] = $this->outputFormat; + } + if (null !== $this->tagsShrink) { + $res['tags'] = $this->tagsShrink; + } + if (null !== $this->taskDescription) { + $res['taskDescription'] = $this->taskDescription; + } + + return $res; + } + + /** + * @param array $map + * + * @return RunTagMiningAnalysisShrinkRequest + */ + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['businessType'])) { + $model->businessType = $map['businessType']; + } + if (isset($map['content'])) { + $model->content = $map['content']; + } + if (isset($map['extraInfo'])) { + $model->extraInfo = $map['extraInfo']; + } + if (isset($map['modelId'])) { + $model->modelId = $map['modelId']; + } + if (isset($map['outputFormat'])) { + $model->outputFormat = $map['outputFormat']; + } + if (isset($map['tags'])) { + $model->tagsShrink = $map['tags']; + } + if (isset($map['taskDescription'])) { + $model->taskDescription = $map['taskDescription']; + } + + return $model; + } +} diff --git a/src/QuanMiaoLightApp.php b/src/QuanMiaoLightApp.php index 4ddb407..be31c57 100644 --- a/src/QuanMiaoLightApp.php +++ b/src/QuanMiaoLightApp.php @@ -8,6 +8,9 @@ use AlibabaCloud\OpenApiUtil\OpenApiUtilClient; use AlibabaCloud\SDK\QuanMiaoLightApp\V20240801\Models\GenerateBroadcastNewsRequest; use AlibabaCloud\SDK\QuanMiaoLightApp\V20240801\Models\GenerateBroadcastNewsResponse; +use AlibabaCloud\SDK\QuanMiaoLightApp\V20240801\Models\GenerateOutputFormatRequest; +use AlibabaCloud\SDK\QuanMiaoLightApp\V20240801\Models\GenerateOutputFormatResponse; +use AlibabaCloud\SDK\QuanMiaoLightApp\V20240801\Models\GenerateOutputFormatShrinkRequest; use AlibabaCloud\SDK\QuanMiaoLightApp\V20240801\Models\ListHotTopicSummariesRequest; use AlibabaCloud\SDK\QuanMiaoLightApp\V20240801\Models\ListHotTopicSummariesResponse; use AlibabaCloud\SDK\QuanMiaoLightApp\V20240801\Models\RunHotTopicChatRequest; @@ -28,6 +31,9 @@ use AlibabaCloud\SDK\QuanMiaoLightApp\V20240801\Models\RunStyleWritingRequest; use AlibabaCloud\SDK\QuanMiaoLightApp\V20240801\Models\RunStyleWritingResponse; use AlibabaCloud\SDK\QuanMiaoLightApp\V20240801\Models\RunStyleWritingShrinkRequest; +use AlibabaCloud\SDK\QuanMiaoLightApp\V20240801\Models\RunTagMiningAnalysisRequest; +use AlibabaCloud\SDK\QuanMiaoLightApp\V20240801\Models\RunTagMiningAnalysisResponse; +use AlibabaCloud\SDK\QuanMiaoLightApp\V20240801\Models\RunTagMiningAnalysisShrinkRequest; use AlibabaCloud\SDK\QuanMiaoLightApp\V20240801\Models\RunVideoAnalysisRequest; use AlibabaCloud\SDK\QuanMiaoLightApp\V20240801\Models\RunVideoAnalysisResponse; use AlibabaCloud\SDK\QuanMiaoLightApp\V20240801\Models\RunVideoAnalysisShrinkRequest; @@ -122,6 +128,75 @@ public function generateBroadcastNews($workspaceId, $request) return $this->generateBroadcastNewsWithOptions($workspaceId, $request, $headers, $runtime); } + /** + * @summary 轻应用-标签挖掘-获取示例输出格式 + * * + * @param string $workspaceId + * @param GenerateOutputFormatRequest $tmpReq GenerateOutputFormatRequest + * @param string[] $headers map + * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions + * + * @return GenerateOutputFormatResponse GenerateOutputFormatResponse + */ + public function generateOutputFormatWithOptions($workspaceId, $tmpReq, $headers, $runtime) + { + Utils::validateModel($tmpReq); + $request = new GenerateOutputFormatShrinkRequest([]); + OpenApiUtilClient::convert($tmpReq, $request); + if (!Utils::isUnset($tmpReq->tags)) { + $request->tagsShrink = OpenApiUtilClient::arrayToStringWithSpecifiedStyle($tmpReq->tags, 'tags', 'json'); + } + $body = []; + if (!Utils::isUnset($request->businessType)) { + $body['businessType'] = $request->businessType; + } + if (!Utils::isUnset($request->content)) { + $body['content'] = $request->content; + } + if (!Utils::isUnset($request->extraInfo)) { + $body['extraInfo'] = $request->extraInfo; + } + if (!Utils::isUnset($request->tagsShrink)) { + $body['tags'] = $request->tagsShrink; + } + if (!Utils::isUnset($request->taskDescription)) { + $body['taskDescription'] = $request->taskDescription; + } + $req = new OpenApiRequest([ + 'headers' => $headers, + 'body' => OpenApiUtilClient::parseToMap($body), + ]); + $params = new Params([ + 'action' => 'GenerateOutputFormat', + 'version' => '2024-08-01', + 'protocol' => 'HTTPS', + 'pathname' => '/' . OpenApiUtilClient::getEncodeParam($workspaceId) . '/quanmiao/lightapp/generateOutputFormat', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'ROA', + 'reqBodyType' => 'formData', + 'bodyType' => 'json', + ]); + + return GenerateOutputFormatResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * @summary 轻应用-标签挖掘-获取示例输出格式 + * * + * @param string $workspaceId + * @param GenerateOutputFormatRequest $request GenerateOutputFormatRequest + * + * @return GenerateOutputFormatResponse GenerateOutputFormatResponse + */ + public function generateOutputFormat($workspaceId, $request) + { + $runtime = new RuntimeOptions([]); + $headers = []; + + return $this->generateOutputFormatWithOptions($workspaceId, $request, $headers, $runtime); + } + /** * @summary 轻应用-新闻播报-获取热点话题摘要列表 * * @@ -684,6 +759,81 @@ public function runStyleWriting($workspaceId, $request) return $this->runStyleWritingWithOptions($workspaceId, $request, $headers, $runtime); } + /** + * @summary 轻应用-标签挖掘 + * * + * @param string $workspaceId + * @param RunTagMiningAnalysisRequest $tmpReq RunTagMiningAnalysisRequest + * @param string[] $headers map + * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions + * + * @return RunTagMiningAnalysisResponse RunTagMiningAnalysisResponse + */ + public function runTagMiningAnalysisWithOptions($workspaceId, $tmpReq, $headers, $runtime) + { + Utils::validateModel($tmpReq); + $request = new RunTagMiningAnalysisShrinkRequest([]); + OpenApiUtilClient::convert($tmpReq, $request); + if (!Utils::isUnset($tmpReq->tags)) { + $request->tagsShrink = OpenApiUtilClient::arrayToStringWithSpecifiedStyle($tmpReq->tags, 'tags', 'json'); + } + $body = []; + if (!Utils::isUnset($request->businessType)) { + $body['businessType'] = $request->businessType; + } + if (!Utils::isUnset($request->content)) { + $body['content'] = $request->content; + } + if (!Utils::isUnset($request->extraInfo)) { + $body['extraInfo'] = $request->extraInfo; + } + if (!Utils::isUnset($request->modelId)) { + $body['modelId'] = $request->modelId; + } + if (!Utils::isUnset($request->outputFormat)) { + $body['outputFormat'] = $request->outputFormat; + } + if (!Utils::isUnset($request->tagsShrink)) { + $body['tags'] = $request->tagsShrink; + } + if (!Utils::isUnset($request->taskDescription)) { + $body['taskDescription'] = $request->taskDescription; + } + $req = new OpenApiRequest([ + 'headers' => $headers, + 'body' => OpenApiUtilClient::parseToMap($body), + ]); + $params = new Params([ + 'action' => 'RunTagMiningAnalysis', + 'version' => '2024-08-01', + 'protocol' => 'HTTPS', + 'pathname' => '/' . OpenApiUtilClient::getEncodeParam($workspaceId) . '/quanmiao/lightapp/runTagMiningAnalysis', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'ROA', + 'reqBodyType' => 'formData', + 'bodyType' => 'json', + ]); + + return RunTagMiningAnalysisResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * @summary 轻应用-标签挖掘 + * * + * @param string $workspaceId + * @param RunTagMiningAnalysisRequest $request RunTagMiningAnalysisRequest + * + * @return RunTagMiningAnalysisResponse RunTagMiningAnalysisResponse + */ + public function runTagMiningAnalysis($workspaceId, $request) + { + $runtime = new RuntimeOptions([]); + $headers = []; + + return $this->runTagMiningAnalysisWithOptions($workspaceId, $request, $headers, $runtime); + } + /** * @summary 轻应用-视频理解 * *