diff --git a/ChangeLog.md b/ChangeLog.md index bfbfd93..917d1eb 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,3 +1,10 @@ +2025-01-15 Version: 2.3.0 +- Support API RunScriptChat. +- Support API RunScriptRefine. +- Update API GetVideoAnalysisTask: update response param. +- Update API RunVideoAnalysis: update response param. + + 2025-01-14 Version: 2.2.0 - Support API GetVideoAnalysisConfig. - Support API GetVideoAnalysisTask. diff --git a/src/Models/GetVideoAnalysisTaskResponseBody/data/payload/output.php b/src/Models/GetVideoAnalysisTaskResponseBody/data/payload/output.php index 8116fe0..364d60d 100644 --- a/src/Models/GetVideoAnalysisTaskResponseBody/data/payload/output.php +++ b/src/Models/GetVideoAnalysisTaskResponseBody/data/payload/output.php @@ -13,6 +13,11 @@ class output extends Model { + /** + * @var string + */ + public $resultJsonFileUrl; + /** * @var videoAnalysisResult */ @@ -38,6 +43,7 @@ class output extends Model */ public $videoTitleGenerateResult; protected $_name = [ + 'resultJsonFileUrl' => 'resultJsonFileUrl', 'videoAnalysisResult' => 'videoAnalysisResult', 'videoCaptionResult' => 'videoCaptionResult', 'videoGenerateResult' => 'videoGenerateResult', @@ -52,6 +58,9 @@ public function validate() public function toMap() { $res = []; + if (null !== $this->resultJsonFileUrl) { + $res['resultJsonFileUrl'] = $this->resultJsonFileUrl; + } if (null !== $this->videoAnalysisResult) { $res['videoAnalysisResult'] = null !== $this->videoAnalysisResult ? $this->videoAnalysisResult->toMap() : null; } @@ -79,6 +88,9 @@ public function toMap() public static function fromMap($map = []) { $model = new self(); + if (isset($map['resultJsonFileUrl'])) { + $model->resultJsonFileUrl = $map['resultJsonFileUrl']; + } if (isset($map['videoAnalysisResult'])) { $model->videoAnalysisResult = videoAnalysisResult::fromMap($map['videoAnalysisResult']); } diff --git a/src/Models/RunScriptChatRequest.php b/src/Models/RunScriptChatRequest.php new file mode 100644 index 0000000..a07d2b6 --- /dev/null +++ b/src/Models/RunScriptChatRequest.php @@ -0,0 +1,63 @@ + 'prompt', + 'taskId' => 'taskId', + ]; + + public function validate() + { + } + + public function toMap() + { + $res = []; + if (null !== $this->prompt) { + $res['prompt'] = $this->prompt; + } + if (null !== $this->taskId) { + $res['taskId'] = $this->taskId; + } + + return $res; + } + + /** + * @param array $map + * + * @return RunScriptChatRequest + */ + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['prompt'])) { + $model->prompt = $map['prompt']; + } + if (isset($map['taskId'])) { + $model->taskId = $map['taskId']; + } + + return $model; + } +} diff --git a/src/Models/RunScriptChatResponse.php b/src/Models/RunScriptChatResponse.php new file mode 100644 index 0000000..812ae4b --- /dev/null +++ b/src/Models/RunScriptChatResponse.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 RunScriptChatResponse + */ + 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 = RunScriptChatResponseBody::fromMap($map['body']); + } + + return $model; + } +} diff --git a/src/Models/RunScriptChatResponseBody.php b/src/Models/RunScriptChatResponseBody.php new file mode 100644 index 0000000..2f8d838 --- /dev/null +++ b/src/Models/RunScriptChatResponseBody.php @@ -0,0 +1,75 @@ + 'end', + 'header' => 'header', + 'payload' => 'payload', + ]; + + public function validate() + { + } + + public function toMap() + { + $res = []; + if (null !== $this->end) { + $res['end'] = $this->end; + } + 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; + } + + return $res; + } + + /** + * @param array $map + * + * @return RunScriptChatResponseBody + */ + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['end'])) { + $model->end = $map['end']; + } + if (isset($map['header'])) { + $model->header = header::fromMap($map['header']); + } + if (isset($map['payload'])) { + $model->payload = payload::fromMap($map['payload']); + } + + return $model; + } +} diff --git a/src/Models/RunScriptChatResponseBody/header.php b/src/Models/RunScriptChatResponseBody/header.php new file mode 100644 index 0000000..decf542 --- /dev/null +++ b/src/Models/RunScriptChatResponseBody/header.php @@ -0,0 +1,145 @@ + 'errorCode', + 'errorMessage' => 'errorMessage', + 'event' => 'event', + 'eventInfo' => 'eventInfo', + 'requestId' => 'requestId', + '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->eventInfo) { + $res['eventInfo'] = $this->eventInfo; + } + if (null !== $this->requestId) { + $res['requestId'] = $this->requestId; + } + 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['eventInfo'])) { + $model->eventInfo = $map['eventInfo']; + } + if (isset($map['requestId'])) { + $model->requestId = $map['requestId']; + } + 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/RunScriptChatResponseBody/payload.php b/src/Models/RunScriptChatResponseBody/payload.php new file mode 100644 index 0000000..fd9cda6 --- /dev/null +++ b/src/Models/RunScriptChatResponseBody/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/RunScriptChatResponseBody/payload/output.php b/src/Models/RunScriptChatResponseBody/payload/output.php new file mode 100644 index 0000000..8b3a79e --- /dev/null +++ b/src/Models/RunScriptChatResponseBody/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/RunScriptChatResponseBody/payload/usage.php b/src/Models/RunScriptChatResponseBody/payload/usage.php new file mode 100644 index 0000000..daf6967 --- /dev/null +++ b/src/Models/RunScriptChatResponseBody/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/RunScriptRefineRequest.php b/src/Models/RunScriptRefineRequest.php new file mode 100644 index 0000000..ae0f4b0 --- /dev/null +++ b/src/Models/RunScriptRefineRequest.php @@ -0,0 +1,49 @@ + 'taskId', + ]; + + public function validate() + { + } + + public function toMap() + { + $res = []; + if (null !== $this->taskId) { + $res['taskId'] = $this->taskId; + } + + return $res; + } + + /** + * @param array $map + * + * @return RunScriptRefineRequest + */ + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['taskId'])) { + $model->taskId = $map['taskId']; + } + + return $model; + } +} diff --git a/src/Models/RunScriptRefineResponse.php b/src/Models/RunScriptRefineResponse.php new file mode 100644 index 0000000..0cf5a9d --- /dev/null +++ b/src/Models/RunScriptRefineResponse.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 RunScriptRefineResponse + */ + 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 = RunScriptRefineResponseBody::fromMap($map['body']); + } + + return $model; + } +} diff --git a/src/Models/RunScriptRefineResponseBody.php b/src/Models/RunScriptRefineResponseBody.php new file mode 100644 index 0000000..352a2e2 --- /dev/null +++ b/src/Models/RunScriptRefineResponseBody.php @@ -0,0 +1,73 @@ + 'end', + 'header' => 'header', + 'payload' => 'payload', + ]; + + public function validate() + { + } + + public function toMap() + { + $res = []; + if (null !== $this->end) { + $res['end'] = $this->end; + } + 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; + } + + return $res; + } + + /** + * @param array $map + * + * @return RunScriptRefineResponseBody + */ + public static function fromMap($map = []) + { + $model = new self(); + if (isset($map['end'])) { + $model->end = $map['end']; + } + if (isset($map['header'])) { + $model->header = header::fromMap($map['header']); + } + if (isset($map['payload'])) { + $model->payload = payload::fromMap($map['payload']); + } + + return $model; + } +} diff --git a/src/Models/RunScriptRefineResponseBody/header.php b/src/Models/RunScriptRefineResponseBody/header.php new file mode 100644 index 0000000..ac6c9e6 --- /dev/null +++ b/src/Models/RunScriptRefineResponseBody/header.php @@ -0,0 +1,145 @@ + 'errorCode', + 'errorMessage' => 'errorMessage', + 'event' => 'event', + 'eventInfo' => 'eventInfo', + 'requestId' => 'requestId', + '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->eventInfo) { + $res['eventInfo'] = $this->eventInfo; + } + if (null !== $this->requestId) { + $res['requestId'] = $this->requestId; + } + 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['eventInfo'])) { + $model->eventInfo = $map['eventInfo']; + } + if (isset($map['requestId'])) { + $model->requestId = $map['requestId']; + } + 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/RunScriptRefineResponseBody/payload.php b/src/Models/RunScriptRefineResponseBody/payload.php new file mode 100644 index 0000000..e785076 --- /dev/null +++ b/src/Models/RunScriptRefineResponseBody/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/RunScriptRefineResponseBody/payload/output.php b/src/Models/RunScriptRefineResponseBody/payload/output.php new file mode 100644 index 0000000..d15377a --- /dev/null +++ b/src/Models/RunScriptRefineResponseBody/payload/output.php @@ -0,0 +1,111 @@ + 'content', + 'outline' => 'outline', + 'role' => 'role', + 'scene' => 'scene', + 'summary' => 'summary', + 'text' => 'text', + ]; + + public function validate() + { + } + + public function toMap() + { + $res = []; + if (null !== $this->content) { + $res['content'] = $this->content; + } + if (null !== $this->outline) { + $res['outline'] = $this->outline; + } + if (null !== $this->role) { + $res['role'] = $this->role; + } + if (null !== $this->scene) { + $res['scene'] = $this->scene; + } + if (null !== $this->summary) { + $res['summary'] = $this->summary; + } + 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['content'])) { + if (!empty($map['content'])) { + $model->content = $map['content']; + } + } + if (isset($map['outline'])) { + $model->outline = $map['outline']; + } + if (isset($map['role'])) { + $model->role = $map['role']; + } + if (isset($map['scene'])) { + $model->scene = $map['scene']; + } + if (isset($map['summary'])) { + $model->summary = $map['summary']; + } + if (isset($map['text'])) { + $model->text = $map['text']; + } + + return $model; + } +} diff --git a/src/Models/RunScriptRefineResponseBody/payload/usage.php b/src/Models/RunScriptRefineResponseBody/payload/usage.php new file mode 100644 index 0000000..ce35c2d --- /dev/null +++ b/src/Models/RunScriptRefineResponseBody/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/RunVideoAnalysisResponseBody/payload/output.php b/src/Models/RunVideoAnalysisResponseBody/payload/output.php index 21f77fd..eb983aa 100644 --- a/src/Models/RunVideoAnalysisResponseBody/payload/output.php +++ b/src/Models/RunVideoAnalysisResponseBody/payload/output.php @@ -14,6 +14,13 @@ class output extends Model { + /** + * @example http:// + * + * @var string + */ + public $resultJsonFileUrl; + /** * @var videoAnalysisResult */ @@ -44,6 +51,7 @@ class output extends Model */ public $videoTitleGenerateResult; protected $_name = [ + 'resultJsonFileUrl' => 'resultJsonFileUrl', 'videoAnalysisResult' => 'videoAnalysisResult', 'videoCaptionResult' => 'videoCaptionResult', 'videoGenerateResult' => 'videoGenerateResult', @@ -59,6 +67,9 @@ public function validate() public function toMap() { $res = []; + if (null !== $this->resultJsonFileUrl) { + $res['resultJsonFileUrl'] = $this->resultJsonFileUrl; + } if (null !== $this->videoAnalysisResult) { $res['videoAnalysisResult'] = null !== $this->videoAnalysisResult ? $this->videoAnalysisResult->toMap() : null; } @@ -89,6 +100,9 @@ public function toMap() public static function fromMap($map = []) { $model = new self(); + if (isset($map['resultJsonFileUrl'])) { + $model->resultJsonFileUrl = $map['resultJsonFileUrl']; + } if (isset($map['videoAnalysisResult'])) { $model->videoAnalysisResult = videoAnalysisResult::fromMap($map['videoAnalysisResult']); } diff --git a/src/QuanMiaoLightApp.php b/src/QuanMiaoLightApp.php index d3dc498..0c0b64a 100644 --- a/src/QuanMiaoLightApp.php +++ b/src/QuanMiaoLightApp.php @@ -27,10 +27,14 @@ use AlibabaCloud\SDK\QuanMiaoLightApp\V20240801\Models\RunMarketingInformationExtractShrinkRequest; use AlibabaCloud\SDK\QuanMiaoLightApp\V20240801\Models\RunMarketingInformationWritingRequest; use AlibabaCloud\SDK\QuanMiaoLightApp\V20240801\Models\RunMarketingInformationWritingResponse; +use AlibabaCloud\SDK\QuanMiaoLightApp\V20240801\Models\RunScriptChatRequest; +use AlibabaCloud\SDK\QuanMiaoLightApp\V20240801\Models\RunScriptChatResponse; use AlibabaCloud\SDK\QuanMiaoLightApp\V20240801\Models\RunScriptContinueRequest; use AlibabaCloud\SDK\QuanMiaoLightApp\V20240801\Models\RunScriptContinueResponse; use AlibabaCloud\SDK\QuanMiaoLightApp\V20240801\Models\RunScriptPlanningRequest; use AlibabaCloud\SDK\QuanMiaoLightApp\V20240801\Models\RunScriptPlanningResponse; +use AlibabaCloud\SDK\QuanMiaoLightApp\V20240801\Models\RunScriptRefineRequest; +use AlibabaCloud\SDK\QuanMiaoLightApp\V20240801\Models\RunScriptRefineResponse; use AlibabaCloud\SDK\QuanMiaoLightApp\V20240801\Models\RunStyleWritingRequest; use AlibabaCloud\SDK\QuanMiaoLightApp\V20240801\Models\RunStyleWritingResponse; use AlibabaCloud\SDK\QuanMiaoLightApp\V20240801\Models\RunStyleWritingShrinkRequest; @@ -666,6 +670,61 @@ public function runMarketingInformationWriting($workspaceId, $request) return $this->runMarketingInformationWritingWithOptions($workspaceId, $request, $headers, $runtime); } + /** + * @summary 长剧本创作 + * * + * @param string $workspaceId + * @param RunScriptChatRequest $request RunScriptChatRequest + * @param string[] $headers map + * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions + * + * @return RunScriptChatResponse RunScriptChatResponse + */ + public function runScriptChatWithOptions($workspaceId, $request, $headers, $runtime) + { + Utils::validateModel($request); + $body = []; + if (!Utils::isUnset($request->prompt)) { + $body['prompt'] = $request->prompt; + } + if (!Utils::isUnset($request->taskId)) { + $body['taskId'] = $request->taskId; + } + $req = new OpenApiRequest([ + 'headers' => $headers, + 'body' => OpenApiUtilClient::parseToMap($body), + ]); + $params = new Params([ + 'action' => 'RunScriptChat', + 'version' => '2024-08-01', + 'protocol' => 'HTTPS', + 'pathname' => '/' . OpenApiUtilClient::getEncodeParam($workspaceId) . '/quanmiao/lightapp/runScriptChat', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'ROA', + 'reqBodyType' => 'formData', + 'bodyType' => 'json', + ]); + + return RunScriptChatResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * @summary 长剧本创作 + * * + * @param string $workspaceId + * @param RunScriptChatRequest $request RunScriptChatRequest + * + * @return RunScriptChatResponse RunScriptChatResponse + */ + public function runScriptChat($workspaceId, $request) + { + $runtime = new RuntimeOptions([]); + $headers = []; + + return $this->runScriptChatWithOptions($workspaceId, $request, $headers, $runtime); + } + /** * @summary 剧本续写 * * @@ -794,6 +853,58 @@ public function runScriptPlanning($workspaceId, $request) return $this->runScriptPlanningWithOptions($workspaceId, $request, $headers, $runtime); } + /** + * @summary 剧本对话内容的整理 + * * + * @param string $workspaceId + * @param RunScriptRefineRequest $request RunScriptRefineRequest + * @param string[] $headers map + * @param RuntimeOptions $runtime runtime options for this request RuntimeOptions + * + * @return RunScriptRefineResponse RunScriptRefineResponse + */ + public function runScriptRefineWithOptions($workspaceId, $request, $headers, $runtime) + { + Utils::validateModel($request); + $body = []; + if (!Utils::isUnset($request->taskId)) { + $body['taskId'] = $request->taskId; + } + $req = new OpenApiRequest([ + 'headers' => $headers, + 'body' => OpenApiUtilClient::parseToMap($body), + ]); + $params = new Params([ + 'action' => 'RunScriptRefine', + 'version' => '2024-08-01', + 'protocol' => 'HTTPS', + 'pathname' => '/' . OpenApiUtilClient::getEncodeParam($workspaceId) . '/quanmiao/lightapp/runScriptRefine', + 'method' => 'POST', + 'authType' => 'AK', + 'style' => 'ROA', + 'reqBodyType' => 'formData', + 'bodyType' => 'json', + ]); + + return RunScriptRefineResponse::fromMap($this->callApi($params, $req, $runtime)); + } + + /** + * @summary 剧本对话内容的整理 + * * + * @param string $workspaceId + * @param RunScriptRefineRequest $request RunScriptRefineRequest + * + * @return RunScriptRefineResponse RunScriptRefineResponse + */ + public function runScriptRefine($workspaceId, $request) + { + $runtime = new RuntimeOptions([]); + $headers = []; + + return $this->runScriptRefineWithOptions($workspaceId, $request, $headers, $runtime); + } + /** * @summary 文体学习和写作推理服务 * *