diff --git a/VERSION b/VERSION index a1dad2a..cfe389e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.3.23 +0.3.24 diff --git a/src/UAIModelverse/Apis/DownloadUMInferRequestLogRequest.php b/src/UAIModelverse/Apis/DownloadUMInferRequestLogRequest.php new file mode 100644 index 0000000..532803f --- /dev/null +++ b/src/UAIModelverse/Apis/DownloadUMInferRequestLogRequest.php @@ -0,0 +1,214 @@ + "DownloadUMInferRequestLog"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("StartTime"); + $this->markRequired("EndTime"); + $this->markRequired("Email"); + } + + + + /** + * Region: 业务地域,如 cn-wlcb。可先调用 ListUMInferRegions 获取可选地域 + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 业务地域,如 cn-wlcb。可先调用 ListUMInferRegions 获取可选地域 + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。请参考 [GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。请参考 [GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * StartTime: 导出开始时间,Unix 毫秒时间戳 + * + * @return integer|null + */ + public function getStartTime() + { + return $this->get("StartTime"); + } + + /** + * StartTime: 导出开始时间,Unix 毫秒时间戳 + * + * @param int $startTime + */ + public function setStartTime($startTime) + { + $this->set("StartTime", $startTime); + } + + /** + * EndTime: 导出结束时间,Unix 毫秒时间戳,最长支持 30 天范围 + * + * @return integer|null + */ + public function getEndTime() + { + return $this->get("EndTime"); + } + + /** + * EndTime: 导出结束时间,Unix 毫秒时间戳,最长支持 30 天范围 + * + * @param int $endTime + */ + public function setEndTime($endTime) + { + $this->set("EndTime", $endTime); + } + + /** + * Email: 接收导出结果的邮箱地址 + * + * @return string|null + */ + public function getEmail() + { + return $this->get("Email"); + } + + /** + * Email: 接收导出结果的邮箱地址 + * + * @param string $email + */ + public function setEmail($email) + { + $this->set("Email", $email); + } + + /** + * ModelNames: 模型名称列表,用于过滤 + * + * @return string[]|null + */ + public function getModelNames() + { + return $this->get("ModelNames"); + } + + /** + * ModelNames: 模型名称列表,用于过滤 + * + * @param string[] $modelNames + */ + public function setModelNames(array $modelNames) + { + $this->set("ModelNames", $modelNames); + } + + /** + * ApiKeyIds: API Key ID 列表,用于过滤 + * + * @return string[]|null + */ + public function getApiKeyIds() + { + return $this->get("ApiKeyIds"); + } + + /** + * ApiKeyIds: API Key ID 列表,用于过滤 + * + * @param string[] $apiKeyIds + */ + public function setApiKeyIds(array $apiKeyIds) + { + $this->set("ApiKeyIds", $apiKeyIds); + } + + /** + * RequestId: 请求 ID,用于精确过滤 + * + * @return string|null + */ + public function getRequestId() + { + return $this->get("RequestId"); + } + + /** + * RequestId: 请求 ID,用于精确过滤 + * + * @param string $requestId + */ + public function setRequestId($requestId) + { + $this->set("RequestId", $requestId); + } +} diff --git a/src/UAIModelverse/Apis/DownloadUMInferRequestLogResponse.php b/src/UAIModelverse/Apis/DownloadUMInferRequestLogResponse.php new file mode 100644 index 0000000..307cc94 --- /dev/null +++ b/src/UAIModelverse/Apis/DownloadUMInferRequestLogResponse.php @@ -0,0 +1,64 @@ +get("TaskId"); + } + + /** + * TaskId: 导出任务 ID + * + * @param string $taskId + */ + public function setTaskId($taskId) + { + $this->set("TaskId", $taskId); + } + + /** + * TotalCount: 本次导出查询命中的日志行数 + * + * @return integer|null + */ + public function getTotalCount() + { + return $this->get("TotalCount"); + } + + /** + * TotalCount: 本次导出查询命中的日志行数 + * + * @param int $totalCount + */ + public function setTotalCount($totalCount) + { + $this->set("TotalCount", $totalCount); + } +} diff --git a/src/UAIModelverse/Apis/GetUFSquareModelDetailRequest.php b/src/UAIModelverse/Apis/GetUFSquareModelDetailRequest.php new file mode 100644 index 0000000..22cf559 --- /dev/null +++ b/src/UAIModelverse/Apis/GetUFSquareModelDetailRequest.php @@ -0,0 +1,112 @@ + "GetUFSquareModelDetail"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("Id"); + } + + + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Id: 主键 + * + * @return string|null + */ + public function getId() + { + return $this->get("Id"); + } + + /** + * Id: 主键 + * + * @param string $id + */ + public function setId($id) + { + $this->set("Id", $id); + } +} diff --git a/src/UAIModelverse/Apis/GetUFSquareModelDetailResponse.php b/src/UAIModelverse/Apis/GetUFSquareModelDetailResponse.php new file mode 100644 index 0000000..cf2d457 --- /dev/null +++ b/src/UAIModelverse/Apis/GetUFSquareModelDetailResponse.php @@ -0,0 +1,48 @@ +get("SquareModel")); + } + + /** + * SquareModel: 模型 + * + * @param SquareModel $squareModel + */ + public function setSquareModel(array $squareModel) + { + $this->set("SquareModel", $squareModel->getAll()); + } +} diff --git a/src/UAIModelverse/Apis/GetUFSquareModelPricesRequest.php b/src/UAIModelverse/Apis/GetUFSquareModelPricesRequest.php new file mode 100644 index 0000000..dcb14fb --- /dev/null +++ b/src/UAIModelverse/Apis/GetUFSquareModelPricesRequest.php @@ -0,0 +1,89 @@ + "GetUFSquareModelPrices"]); + } + + + + /** + * Keyword: 模型名称模糊搜索(例:deepseek-r1) + * + * @return string|null + */ + public function getKeyword() + { + return $this->get("Keyword"); + } + + /** + * Keyword: 模型名称模糊搜索(例:deepseek-r1) + * + * @param string $keyword + */ + public function setKeyword($keyword) + { + $this->set("Keyword", $keyword); + } + + /** + * Offset: 列表起始位置偏移量,默认为0 + * + * @return integer|null + */ + public function getOffset() + { + return $this->get("Offset"); + } + + /** + * Offset: 列表起始位置偏移量,默认为0 + * + * @param int $offset + */ + public function setOffset($offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: 返回数据长度,默认为20 + * + * @return integer|null + */ + public function getLimit() + { + return $this->get("Limit"); + } + + /** + * Limit: 返回数据长度,默认为20 + * + * @param int $limit + */ + public function setLimit($limit) + { + $this->set("Limit", $limit); + } +} diff --git a/src/UAIModelverse/Apis/GetUFSquareModelPricesResponse.php b/src/UAIModelverse/Apis/GetUFSquareModelPricesResponse.php new file mode 100644 index 0000000..ac55dd4 --- /dev/null +++ b/src/UAIModelverse/Apis/GetUFSquareModelPricesResponse.php @@ -0,0 +1,79 @@ +get("Models"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new ModelPriceGroup($item)); + } + return $result; + } + + /** + * Models: 匹配模型的价格信息 + * + * @param ModelPriceGroup[] $models + */ + public function setModels(array $models) + { + $result = []; + foreach ($models as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * TotalCount: 总条数用于翻页 + * + * @return integer|null + */ + public function getTotalCount() + { + return $this->get("TotalCount"); + } + + /** + * TotalCount: 总条数用于翻页 + * + * @param int $totalCount + */ + public function setTotalCount($totalCount) + { + $this->set("TotalCount", $totalCount); + } +} diff --git a/src/UAIModelverse/Apis/GetUMInferRequestLogDetailRequest.php b/src/UAIModelverse/Apis/GetUMInferRequestLogDetailRequest.php new file mode 100644 index 0000000..187d2b2 --- /dev/null +++ b/src/UAIModelverse/Apis/GetUMInferRequestLogDetailRequest.php @@ -0,0 +1,112 @@ + "GetUMInferRequestLogDetail"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("RequestId"); + } + + + + /** + * Region: 业务地域,如 cn-wlcb。可先调用 ListUMInferRegions 获取可选地域 + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 业务地域,如 cn-wlcb。可先调用 ListUMInferRegions 获取可选地域 + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。请参考 [GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。请参考 [GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * RequestId: 请求 ID + * + * @return string|null + */ + public function getRequestId() + { + return $this->get("RequestId"); + } + + /** + * RequestId: 请求 ID + * + * @param string $requestId + */ + public function setRequestId($requestId) + { + $this->set("RequestId", $requestId); + } +} diff --git a/src/UAIModelverse/Apis/GetUMInferRequestLogDetailResponse.php b/src/UAIModelverse/Apis/GetUMInferRequestLogDetailResponse.php new file mode 100644 index 0000000..34c7928 --- /dev/null +++ b/src/UAIModelverse/Apis/GetUMInferRequestLogDetailResponse.php @@ -0,0 +1,45 @@ +get("Data")); + } + + /** + * Data: 请求日志详情 + * + * @param RequestLogDetail $data + */ + public function setData(array $data) + { + $this->set("Data", $data->getAll()); + } +} diff --git a/src/UAIModelverse/Apis/ListUFSquareModelFiltersAuthRequest.php b/src/UAIModelverse/Apis/ListUFSquareModelFiltersAuthRequest.php new file mode 100644 index 0000000..2d7dc60 --- /dev/null +++ b/src/UAIModelverse/Apis/ListUFSquareModelFiltersAuthRequest.php @@ -0,0 +1,91 @@ + "ListUFSquareModelFiltersAuth"]); + $this->markRequired("Zone"); + $this->markRequired("Region"); + } + + + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } +} diff --git a/src/UAIModelverse/Apis/ListUFSquareModelFiltersAuthResponse.php b/src/UAIModelverse/Apis/ListUFSquareModelFiltersAuthResponse.php new file mode 100644 index 0000000..ebf295c --- /dev/null +++ b/src/UAIModelverse/Apis/ListUFSquareModelFiltersAuthResponse.php @@ -0,0 +1,26 @@ + "ListUMInferRequestLogs"]); + $this->markRequired("Region"); + $this->markRequired("Zone"); + $this->markRequired("StartTime"); + $this->markRequired("EndTime"); + } + + + + /** + * Region: 业务地域,如 cn-wlcb。可先调用 ListUMInferRegions 获取可选地域 + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 业务地域,如 cn-wlcb。可先调用 ListUMInferRegions 获取可选地域 + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @return string|null + */ + public function getZone() + { + return $this->get("Zone"); + } + + /** + * Zone: 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * + * @param string $zone + */ + public function setZone($zone) + { + $this->set("Zone", $zone); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。请参考 [GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @return string|null + */ + public function getProjectId() + { + return $this->get("ProjectId"); + } + + /** + * ProjectId: 项目ID。不填写为默认项目,子帐号必须填写。请参考 [GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * + * @param string $projectId + */ + public function setProjectId($projectId) + { + $this->set("ProjectId", $projectId); + } + + /** + * StartTime: 查询开始时间,Unix 毫秒时间戳 + * + * @return integer|null + */ + public function getStartTime() + { + return $this->get("StartTime"); + } + + /** + * StartTime: 查询开始时间,Unix 毫秒时间戳 + * + * @param int $startTime + */ + public function setStartTime($startTime) + { + $this->set("StartTime", $startTime); + } + + /** + * EndTime: 查询结束时间,Unix 毫秒时间戳,必须大于等于 StartTime + * + * @return integer|null + */ + public function getEndTime() + { + return $this->get("EndTime"); + } + + /** + * EndTime: 查询结束时间,Unix 毫秒时间戳,必须大于等于 StartTime + * + * @param int $endTime + */ + public function setEndTime($endTime) + { + $this->set("EndTime", $endTime); + } + + /** + * ModelNames: 模型名称列表,用于过滤 + * + * @return string[]|null + */ + public function getModelNames() + { + return $this->get("ModelNames"); + } + + /** + * ModelNames: 模型名称列表,用于过滤 + * + * @param string[] $modelNames + */ + public function setModelNames(array $modelNames) + { + $this->set("ModelNames", $modelNames); + } + + /** + * ApiKeyIds: API Key ID 列表,用于过滤 + * + * @return string[]|null + */ + public function getApiKeyIds() + { + return $this->get("ApiKeyIds"); + } + + /** + * ApiKeyIds: API Key ID 列表,用于过滤 + * + * @param string[] $apiKeyIds + */ + public function setApiKeyIds(array $apiKeyIds) + { + $this->set("ApiKeyIds", $apiKeyIds); + } + + /** + * RequestId: 请求 ID,用于精确过滤 + * + * @return string|null + */ + public function getRequestId() + { + return $this->get("RequestId"); + } + + /** + * RequestId: 请求 ID,用于精确过滤 + * + * @param string $requestId + */ + public function setRequestId($requestId) + { + $this->set("RequestId", $requestId); + } + + /** + * Offset: 列表偏移量,默认 0 + * + * @return integer|null + */ + public function getOffset() + { + return $this->get("Offset"); + } + + /** + * Offset: 列表偏移量,默认 0 + * + * @param int $offset + */ + public function setOffset($offset) + { + $this->set("Offset", $offset); + } + + /** + * Limit: 返回数量,默认 20 + * + * @return integer|null + */ + public function getLimit() + { + return $this->get("Limit"); + } + + /** + * Limit: 返回数量,默认 20 + * + * @param int $limit + */ + public function setLimit($limit) + { + $this->set("Limit", $limit); + } +} diff --git a/src/UAIModelverse/Apis/ListUMInferRequestLogsResponse.php b/src/UAIModelverse/Apis/ListUMInferRequestLogsResponse.php new file mode 100644 index 0000000..47ed4b5 --- /dev/null +++ b/src/UAIModelverse/Apis/ListUMInferRequestLogsResponse.php @@ -0,0 +1,47 @@ +get("Data")); + } + + /** + * Data: 日志明细列表返回数据 + * + * @param ListUMInferRequestLogsData $data + */ + public function setData(array $data) + { + $this->set("Data", $data->getAll()); + } +} diff --git a/src/UAIModelverse/Apis/StartPayUnpaidOrdersRequest.php b/src/UAIModelverse/Apis/StartPayUnpaidOrdersRequest.php new file mode 100644 index 0000000..5aced49 --- /dev/null +++ b/src/UAIModelverse/Apis/StartPayUnpaidOrdersRequest.php @@ -0,0 +1,50 @@ + "StartPayUnpaidOrders"]); + $this->markRequired("OrderNos"); + } + + + + /** + * OrderNos: 欠费订单号列表,最多 50 个 + * + * @return string[]|null + */ + public function getOrderNos() + { + return $this->get("OrderNos"); + } + + /** + * OrderNos: 欠费订单号列表,最多 50 个 + * + * @param string[] $orderNos + */ + public function setOrderNos(array $orderNos) + { + $this->set("OrderNos", $orderNos); + } +} diff --git a/src/UAIModelverse/Apis/StartPayUnpaidOrdersResponse.php b/src/UAIModelverse/Apis/StartPayUnpaidOrdersResponse.php new file mode 100644 index 0000000..dbec02b --- /dev/null +++ b/src/UAIModelverse/Apis/StartPayUnpaidOrdersResponse.php @@ -0,0 +1,85 @@ +get("SuccessCount"); + } + + /** + * SuccessCount: 支付成功数量 + * + * @param int $successCount + */ + public function setSuccessCount($successCount) + { + $this->set("SuccessCount", $successCount); + } + + /** + * FailureCount: 支付失败数量 + * + * @return integer|null + */ + public function getFailureCount() + { + return $this->get("FailureCount"); + } + + /** + * FailureCount: 支付失败数量 + * + * @param int $failureCount + */ + public function setFailureCount($failureCount) + { + $this->set("FailureCount", $failureCount); + } + + /** + * Results: 支付结果 + * + * @return PayResult|null + */ + public function getResults() + { + return new PayResult($this->get("Results")); + } + + /** + * Results: 支付结果 + * + * @param PayResult $results + */ + public function setResults(array $results) + { + $this->set("Results", $results->getAll()); + } +} diff --git a/src/UAIModelverse/Models/ListUMInferRequestLogsData.php b/src/UAIModelverse/Models/ListUMInferRequestLogsData.php new file mode 100644 index 0000000..e1a3449 --- /dev/null +++ b/src/UAIModelverse/Models/ListUMInferRequestLogsData.php @@ -0,0 +1,76 @@ +get("Summary")); + } + + /** + * Summary: 汇总信息 + * + * @param RequestLogSummary $summary + */ + public function setSummary(array $summary) + { + $this->set("Summary", $summary->getAll()); + } + + /** + * Items: 日志列表,数组元素为 RequestLogItem + * + * @return RequestLogItem[]|null + */ + public function getItems() + { + $items = $this->get("Items"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new RequestLogItem($item)); + } + return $result; + } + + /** + * Items: 日志列表,数组元素为 RequestLogItem + * + * @param RequestLogItem[] $items + */ + public function setItems(array $items) + { + $result = []; + foreach ($items as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UAIModelverse/Models/ModelPriceGroup.php b/src/UAIModelverse/Models/ModelPriceGroup.php new file mode 100644 index 0000000..fdecf93 --- /dev/null +++ b/src/UAIModelverse/Models/ModelPriceGroup.php @@ -0,0 +1,116 @@ +get("Manufacturer"); + } + + /** + * Manufacturer: 制造商 + * + * @param string $manufacturer + */ + public function setManufacturer($manufacturer) + { + $this->set("Manufacturer", $manufacturer); + } + + /** + * ModelName: 模型名称 + * + * @return string|null + */ + public function getModelName() + { + return $this->get("ModelName"); + } + + /** + * ModelName: 模型名称 + * + * @param string $modelName + */ + public function setModelName($modelName) + { + $this->set("ModelName", $modelName); + } + + /** + * ModelId: ModelId + * + * @return string|null + */ + public function getModelId() + { + return $this->get("ModelId"); + } + + /** + * ModelId: ModelId + * + * @param string $modelId + */ + public function setModelId($modelId) + { + $this->set("ModelId", $modelId); + } + + /** + * Tiers: 价格阶梯(有序数组) + * + * @return PriceTier[]|null + */ + public function getTiers() + { + $items = $this->get("Tiers"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new PriceTier($item)); + } + return $result; + } + + /** + * Tiers: 价格阶梯(有序数组) + * + * @param PriceTier[] $tiers + */ + public function setTiers(array $tiers) + { + $result = []; + foreach ($tiers as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } +} diff --git a/src/UAIModelverse/Models/PayResult.php b/src/UAIModelverse/Models/PayResult.php new file mode 100644 index 0000000..9c6f3db --- /dev/null +++ b/src/UAIModelverse/Models/PayResult.php @@ -0,0 +1,84 @@ +get("OrderNo"); + } + + /** + * OrderNo: 订单号 + * + * @param string $orderNo + */ + public function setOrderNo($orderNo) + { + $this->set("OrderNo", $orderNo); + } + + /** + * Success: 是否支付成功 + * + * @return boolean|null + */ + public function getSuccess() + { + return $this->get("Success"); + } + + /** + * Success: 是否支付成功 + * + * @param boolean $success + */ + public function setSuccess($success) + { + $this->set("Success", $success); + } + + /** + * Reason: 失败原因(成功时为空) + * + * @return string|null + */ + public function getReason() + { + return $this->get("Reason"); + } + + /** + * Reason: 失败原因(成功时为空) + * + * @param string $reason + */ + public function setReason($reason) + { + $this->set("Reason", $reason); + } +} diff --git a/src/UAIModelverse/Models/PriceRate.php b/src/UAIModelverse/Models/PriceRate.php new file mode 100644 index 0000000..7d1c266 --- /dev/null +++ b/src/UAIModelverse/Models/PriceRate.php @@ -0,0 +1,164 @@ +get("ChargeItemDescriptionEn"); + } + + /** + * ChargeItemDescriptionEn: 收费项描述英文描述 + * + * @param string $chargeItemDescriptionEn + */ + public function setChargeItemDescriptionEn($chargeItemDescriptionEn) + { + $this->set("ChargeItemDescriptionEn", $chargeItemDescriptionEn); + } + + /** + * Currency: 货币单位 + * + * @return string|null + */ + public function getCurrency() + { + return $this->get("Currency"); + } + + /** + * Currency: 货币单位 + * + * @param string $currency + */ + public function setCurrency($currency) + { + $this->set("Currency", $currency); + } + + /** + * Unit: 计价单位 + * + * @return string|null + */ + public function getUnit() + { + return $this->get("Unit"); + } + + /** + * Unit: 计价单位 + * + * @param string $unit + */ + public function setUnit($unit) + { + $this->set("Unit", $unit); + } + + /** + * UnitEn: 计价单位英文 + * + * @return string|null + */ + public function getUnitEn() + { + return $this->get("UnitEn"); + } + + /** + * UnitEn: 计价单位英文 + * + * @param string $unitEn + */ + public function setUnitEn($unitEn) + { + $this->set("UnitEn", $unitEn); + } + + /** + * ChargeItem: 收费项:input/output/thinking/tool... + * + * @return string|null + */ + public function getChargeItem() + { + return $this->get("ChargeItem"); + } + + /** + * ChargeItem: 收费项:input/output/thinking/tool... + * + * @param string $chargeItem + */ + public function setChargeItem($chargeItem) + { + $this->set("ChargeItem", $chargeItem); + } + + /** + * ChargeItemDescription: 收费项描述 + * + * @return string|null + */ + public function getChargeItemDescription() + { + return $this->get("ChargeItemDescription"); + } + + /** + * ChargeItemDescription: 收费项描述 + * + * @param string $chargeItemDescription + */ + public function setChargeItemDescription($chargeItemDescription) + { + $this->set("ChargeItemDescription", $chargeItemDescription); + } + + /** + * Price: 价格 + * + * @return string|null + */ + public function getPrice() + { + return $this->get("Price"); + } + + /** + * Price: 价格 + * + * @param string $price + */ + public function setPrice($price) + { + $this->set("Price", $price); + } +} diff --git a/src/UAIModelverse/Models/PriceTier.php b/src/UAIModelverse/Models/PriceTier.php new file mode 100644 index 0000000..f02a079 --- /dev/null +++ b/src/UAIModelverse/Models/PriceTier.php @@ -0,0 +1,116 @@ +get("Rates"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new PriceRate($item)); + } + return $result; + } + + /** + * Rates: 该档位下的收费列表(有序数组) + * + * @param PriceRate[] $rates + */ + public function setRates(array $rates) + { + $result = []; + foreach ($rates as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } + + /** + * DescriptionEn: 档位描述(例如 "标准上下文 32k") + * + * @return string|null + */ + public function getDescriptionEn() + { + return $this->get("DescriptionEn"); + } + + /** + * DescriptionEn: 档位描述(例如 "标准上下文 32k") + * + * @param string $descriptionEn + */ + public function setDescriptionEn($descriptionEn) + { + $this->set("DescriptionEn", $descriptionEn); + } + + /** + * Condition: 档位/条件(例如 "32k"、"128k") + * + * @return string|null + */ + public function getCondition() + { + return $this->get("Condition"); + } + + /** + * Condition: 档位/条件(例如 "32k"、"128k") + * + * @param string $condition + */ + public function setCondition($condition) + { + $this->set("Condition", $condition); + } + + /** + * Description: 档位描述(例如 "标准上下文 32k") + * + * @return string|null + */ + public function getDescription() + { + return $this->get("Description"); + } + + /** + * Description: 档位描述(例如 "标准上下文 32k") + * + * @param string $description + */ + public function setDescription($description) + { + $this->set("Description", $description); + } +} diff --git a/src/UAIModelverse/Models/Pricing.php b/src/UAIModelverse/Models/Pricing.php index f613283..086aa60 100644 --- a/src/UAIModelverse/Models/Pricing.php +++ b/src/UAIModelverse/Models/Pricing.php @@ -82,6 +82,26 @@ public function setImage($image) $this->set("Image", $image); } + /** + * Video: 生视频定价 + * + * @return string|null + */ + public function getVideo() + { + return $this->get("Video"); + } + + /** + * Video: 生视频定价 + * + * @param string $video + */ + public function setVideo($video) + { + $this->set("Video", $video); + } + /** * Currency: 币种 * @@ -101,4 +121,44 @@ public function setCurrency($currency) { $this->set("Currency", $currency); } + + /** + * Unit: 单位(中文),如“次” “百万” + * + * @return string|null + */ + public function getUnit() + { + return $this->get("Unit"); + } + + /** + * Unit: 单位(中文),如“次” “百万” + * + * @param string $unit + */ + public function setUnit($unit) + { + $this->set("Unit", $unit); + } + + /** + * UnitEn: 单位(English),如“Time” “Million” + * + * @return string|null + */ + public function getUnitEn() + { + return $this->get("UnitEn"); + } + + /** + * UnitEn: 单位(English),如“Time” “Million” + * + * @param string $unitEn + */ + public function setUnitEn($unitEn) + { + $this->set("UnitEn", $unitEn); + } } diff --git a/src/UAIModelverse/Models/RequestLogDetail.php b/src/UAIModelverse/Models/RequestLogDetail.php new file mode 100644 index 0000000..753b6b3 --- /dev/null +++ b/src/UAIModelverse/Models/RequestLogDetail.php @@ -0,0 +1,444 @@ +get("RequestId"); + } + + /** + * RequestId: 请求 ID + * + * @param string $requestId + */ + public function setRequestId($requestId) + { + $this->set("RequestId", $requestId); + } + + /** + * TopOrganizationId: 顶级组织 ID + * + * @return string|null + */ + public function getTopOrganizationId() + { + return $this->get("TopOrganizationId"); + } + + /** + * TopOrganizationId: 顶级组织 ID + * + * @param string $topOrganizationId + */ + public function setTopOrganizationId($topOrganizationId) + { + $this->set("TopOrganizationId", $topOrganizationId); + } + + /** + * OrganizationId: 组织 ID + * + * @return string|null + */ + public function getOrganizationId() + { + return $this->get("OrganizationId"); + } + + /** + * OrganizationId: 组织 ID + * + * @param string $organizationId + */ + public function setOrganizationId($organizationId) + { + $this->set("OrganizationId", $organizationId); + } + + /** + * ClientIp: 客户端 IP + * + * @return string|null + */ + public function getClientIp() + { + return $this->get("ClientIp"); + } + + /** + * ClientIp: 客户端 IP + * + * @param string $clientIp + */ + public function setClientIp($clientIp) + { + $this->set("ClientIp", $clientIp); + } + + /** + * Region: 业务地域 + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 业务地域 + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * StartTime: 请求开始时间,Unix 毫秒时间戳 + * + * @return integer|null + */ + public function getStartTime() + { + return $this->get("StartTime"); + } + + /** + * StartTime: 请求开始时间,Unix 毫秒时间戳 + * + * @param int $startTime + */ + public function setStartTime($startTime) + { + $this->set("StartTime", $startTime); + } + + /** + * StartTimeReadable: 请求开始时间,可读格式 + * + * @return string|null + */ + public function getStartTimeReadable() + { + return $this->get("StartTimeReadable"); + } + + /** + * StartTimeReadable: 请求开始时间,可读格式 + * + * @param string $startTimeReadable + */ + public function setStartTimeReadable($startTimeReadable) + { + $this->set("StartTimeReadable", $startTimeReadable); + } + + /** + * ModelName: 模型名称 + * + * @return string|null + */ + public function getModelName() + { + return $this->get("ModelName"); + } + + /** + * ModelName: 模型名称 + * + * @param string $modelName + */ + public function setModelName($modelName) + { + $this->set("ModelName", $modelName); + } + + /** + * IsStream: 是否流式请求 + * + * @return boolean|null + */ + public function getIsStream() + { + return $this->get("IsStream"); + } + + /** + * IsStream: 是否流式请求 + * + * @param boolean $isStream + */ + public function setIsStream($isStream) + { + $this->set("IsStream", $isStream); + } + + /** + * ApiKeyId: API Key ID + * + * @return string|null + */ + public function getApiKeyId() + { + return $this->get("ApiKeyId"); + } + + /** + * ApiKeyId: API Key ID + * + * @param string $apiKeyId + */ + public function setApiKeyId($apiKeyId) + { + $this->set("ApiKeyId", $apiKeyId); + } + + /** + * HttpStatusCode: HTTP 状态码 + * + * @return integer|null + */ + public function getHttpStatusCode() + { + return $this->get("HttpStatusCode"); + } + + /** + * HttpStatusCode: HTTP 状态码 + * + * @param int $httpStatusCode + */ + public function setHttpStatusCode($httpStatusCode) + { + $this->set("HttpStatusCode", $httpStatusCode); + } + + /** + * ErrorCode: 错误码 + * + * @return string|null + */ + public function getErrorCode() + { + return $this->get("ErrorCode"); + } + + /** + * ErrorCode: 错误码 + * + * @param string $errorCode + */ + public function setErrorCode($errorCode) + { + $this->set("ErrorCode", $errorCode); + } + + /** + * ErrorMessage: 错误信息 + * + * @return string|null + */ + public function getErrorMessage() + { + return $this->get("ErrorMessage"); + } + + /** + * ErrorMessage: 错误信息 + * + * @param string $errorMessage + */ + public function setErrorMessage($errorMessage) + { + $this->set("ErrorMessage", $errorMessage); + } + + /** + * IsSuccess: 请求是否成功 + * + * @return boolean|null + */ + public function getIsSuccess() + { + return $this->get("IsSuccess"); + } + + /** + * IsSuccess: 请求是否成功 + * + * @param boolean $isSuccess + */ + public function setIsSuccess($isSuccess) + { + $this->set("IsSuccess", $isSuccess); + } + + /** + * Latency: 请求总延迟,单位毫秒 + * + * @return integer|null + */ + public function getLatency() + { + return $this->get("Latency"); + } + + /** + * Latency: 请求总延迟,单位毫秒 + * + * @param int $latency + */ + public function setLatency($latency) + { + $this->set("Latency", $latency); + } + + /** + * FirstTokenLatency: 首 Token 延迟,单位毫秒 + * + * @return integer|null + */ + public function getFirstTokenLatency() + { + return $this->get("FirstTokenLatency"); + } + + /** + * FirstTokenLatency: 首 Token 延迟,单位毫秒 + * + * @param int $firstTokenLatency + */ + public function setFirstTokenLatency($firstTokenLatency) + { + $this->set("FirstTokenLatency", $firstTokenLatency); + } + + /** + * OutputTokenThroughput: 输出 Token 吞吐 + * + * @return float|null + */ + public function getOutputTokenThroughput() + { + return $this->get("OutputTokenThroughput"); + } + + /** + * OutputTokenThroughput: 输出 Token 吞吐 + * + * @param float $outputTokenThroughput + */ + public function setOutputTokenThroughput($outputTokenThroughput) + { + $this->set("OutputTokenThroughput", $outputTokenThroughput); + } + + /** + * Usage: 模型返回的 usage 原文 JSON + * + * @return string|null + */ + public function getUsage() + { + return $this->get("Usage"); + } + + /** + * Usage: 模型返回的 usage 原文 JSON + * + * @param string $usage + */ + public function setUsage($usage) + { + $this->set("Usage", $usage); + } + + /** + * Request: 请求原文,本期返回为空 + * + * @return string|null + */ + public function getRequest() + { + return $this->get("Request"); + } + + /** + * Request: 请求原文,本期返回为空 + * + * @param string $request + */ + public function setRequest($request) + { + $this->set("Request", $request); + } + + /** + * Response: 响应原文,本期返回为空 + * + * @return string|null + */ + public function getResponse() + { + return $this->get("Response"); + } + + /** + * Response: 响应原文,本期返回为空 + * + * @param string $response + */ + public function setResponse($response) + { + $this->set("Response", $response); + } + + /** + * Extras: 扩展信息,本期返回为空 + * + * @return string|null + */ + public function getExtras() + { + return $this->get("Extras"); + } + + /** + * Extras: 扩展信息,本期返回为空 + * + * @param string $extras + */ + public function setExtras($extras) + { + $this->set("Extras", $extras); + } +} diff --git a/src/UAIModelverse/Models/RequestLogItem.php b/src/UAIModelverse/Models/RequestLogItem.php new file mode 100644 index 0000000..53331f9 --- /dev/null +++ b/src/UAIModelverse/Models/RequestLogItem.php @@ -0,0 +1,444 @@ +get("RequestId"); + } + + /** + * RequestId: 请求 ID + * + * @param string $requestId + */ + public function setRequestId($requestId) + { + $this->set("RequestId", $requestId); + } + + /** + * StartTime: 请求开始时间,Unix 毫秒时间戳 + * + * @return integer|null + */ + public function getStartTime() + { + return $this->get("StartTime"); + } + + /** + * StartTime: 请求开始时间,Unix 毫秒时间戳 + * + * @param int $startTime + */ + public function setStartTime($startTime) + { + $this->set("StartTime", $startTime); + } + + /** + * StartTimeReadable: 请求开始时间,可读格式 + * + * @return string|null + */ + public function getStartTimeReadable() + { + return $this->get("StartTimeReadable"); + } + + /** + * StartTimeReadable: 请求开始时间,可读格式 + * + * @param string $startTimeReadable + */ + public function setStartTimeReadable($startTimeReadable) + { + $this->set("StartTimeReadable", $startTimeReadable); + } + + /** + * Region: 业务地域 + * + * @return string|null + */ + public function getRegion() + { + return $this->get("Region"); + } + + /** + * Region: 业务地域 + * + * @param string $region + */ + public function setRegion($region) + { + $this->set("Region", $region); + } + + /** + * ModelName: 模型名称 + * + * @return string|null + */ + public function getModelName() + { + return $this->get("ModelName"); + } + + /** + * ModelName: 模型名称 + * + * @param string $modelName + */ + public function setModelName($modelName) + { + $this->set("ModelName", $modelName); + } + + /** + * ApiKeyId: API Key ID + * + * @return string|null + */ + public function getApiKeyId() + { + return $this->get("ApiKeyId"); + } + + /** + * ApiKeyId: API Key ID + * + * @param string $apiKeyId + */ + public function setApiKeyId($apiKeyId) + { + $this->set("ApiKeyId", $apiKeyId); + } + + /** + * ApiKeyName: API Key 名称 + * + * @return string|null + */ + public function getApiKeyName() + { + return $this->get("ApiKeyName"); + } + + /** + * ApiKeyName: API Key 名称 + * + * @param string $apiKeyName + */ + public function setApiKeyName($apiKeyName) + { + $this->set("ApiKeyName", $apiKeyName); + } + + /** + * Latency: 请求总延迟,单位毫秒 + * + * @return integer|null + */ + public function getLatency() + { + return $this->get("Latency"); + } + + /** + * Latency: 请求总延迟,单位毫秒 + * + * @param int $latency + */ + public function setLatency($latency) + { + $this->set("Latency", $latency); + } + + /** + * FirstTokenLatency: 首 Token 延迟,单位毫秒 + * + * @return integer|null + */ + public function getFirstTokenLatency() + { + return $this->get("FirstTokenLatency"); + } + + /** + * FirstTokenLatency: 首 Token 延迟,单位毫秒 + * + * @param int $firstTokenLatency + */ + public function setFirstTokenLatency($firstTokenLatency) + { + $this->set("FirstTokenLatency", $firstTokenLatency); + } + + /** + * OutputTokenThroughput: 输出 Token 吞吐 + * + * @return float|null + */ + public function getOutputTokenThroughput() + { + return $this->get("OutputTokenThroughput"); + } + + /** + * OutputTokenThroughput: 输出 Token 吞吐 + * + * @param float $outputTokenThroughput + */ + public function setOutputTokenThroughput($outputTokenThroughput) + { + $this->set("OutputTokenThroughput", $outputTokenThroughput); + } + + /** + * HttpStatusCode: HTTP 状态码 + * + * @return integer|null + */ + public function getHttpStatusCode() + { + return $this->get("HttpStatusCode"); + } + + /** + * HttpStatusCode: HTTP 状态码 + * + * @param int $httpStatusCode + */ + public function setHttpStatusCode($httpStatusCode) + { + $this->set("HttpStatusCode", $httpStatusCode); + } + + /** + * ErrorCode: 错误码 + * + * @return string|null + */ + public function getErrorCode() + { + return $this->get("ErrorCode"); + } + + /** + * ErrorCode: 错误码 + * + * @param string $errorCode + */ + public function setErrorCode($errorCode) + { + $this->set("ErrorCode", $errorCode); + } + + /** + * IsSuccess: 请求是否成功 + * + * @return boolean|null + */ + public function getIsSuccess() + { + return $this->get("IsSuccess"); + } + + /** + * IsSuccess: 请求是否成功 + * + * @param boolean $isSuccess + */ + public function setIsSuccess($isSuccess) + { + $this->set("IsSuccess", $isSuccess); + } + + /** + * TotalTokens: 总 Token 数 + * + * @return integer|null + */ + public function getTotalTokens() + { + return $this->get("TotalTokens"); + } + + /** + * TotalTokens: 总 Token 数 + * + * @param int $totalTokens + */ + public function setTotalTokens($totalTokens) + { + $this->set("TotalTokens", $totalTokens); + } + + /** + * PromptTokens: 输入 Token 数 + * + * @return integer|null + */ + public function getPromptTokens() + { + return $this->get("PromptTokens"); + } + + /** + * PromptTokens: 输入 Token 数 + * + * @param int $promptTokens + */ + public function setPromptTokens($promptTokens) + { + $this->set("PromptTokens", $promptTokens); + } + + /** + * CompletionTokens: 输出 Token 数 + * + * @return integer|null + */ + public function getCompletionTokens() + { + return $this->get("CompletionTokens"); + } + + /** + * CompletionTokens: 输出 Token 数 + * + * @param int $completionTokens + */ + public function setCompletionTokens($completionTokens) + { + $this->set("CompletionTokens", $completionTokens); + } + + /** + * CacheHitTokens: 缓存命中 Token 数 + * + * @return integer|null + */ + public function getCacheHitTokens() + { + return $this->get("CacheHitTokens"); + } + + /** + * CacheHitTokens: 缓存命中 Token 数 + * + * @param int $cacheHitTokens + */ + public function setCacheHitTokens($cacheHitTokens) + { + $this->set("CacheHitTokens", $cacheHitTokens); + } + + /** + * CacheCreationTokens: 缓存写入 Token 数 + * + * @return integer|null + */ + public function getCacheCreationTokens() + { + return $this->get("CacheCreationTokens"); + } + + /** + * CacheCreationTokens: 缓存写入 Token 数 + * + * @param int $cacheCreationTokens + */ + public function setCacheCreationTokens($cacheCreationTokens) + { + $this->set("CacheCreationTokens", $cacheCreationTokens); + } + + /** + * CacheCreation5mTokens: 5 分钟缓存写入 Token 数 + * + * @return integer|null + */ + public function getCacheCreation5mTokens() + { + return $this->get("CacheCreation5mTokens"); + } + + /** + * CacheCreation5mTokens: 5 分钟缓存写入 Token 数 + * + * @param int $cacheCreation5mTokens + */ + public function setCacheCreation5mTokens($cacheCreation5mTokens) + { + $this->set("CacheCreation5mTokens", $cacheCreation5mTokens); + } + + /** + * CacheCreation1hTokens: 1 小时缓存写入 Token 数 + * + * @return integer|null + */ + public function getCacheCreation1hTokens() + { + return $this->get("CacheCreation1hTokens"); + } + + /** + * CacheCreation1hTokens: 1 小时缓存写入 Token 数 + * + * @param int $cacheCreation1hTokens + */ + public function setCacheCreation1hTokens($cacheCreation1hTokens) + { + $this->set("CacheCreation1hTokens", $cacheCreation1hTokens); + } + + /** + * HasInferenceLog: 是否存在推理日志 + * + * @return boolean|null + */ + public function getHasInferenceLog() + { + return $this->get("HasInferenceLog"); + } + + /** + * HasInferenceLog: 是否存在推理日志 + * + * @param boolean $hasInferenceLog + */ + public function setHasInferenceLog($hasInferenceLog) + { + $this->set("HasInferenceLog", $hasInferenceLog); + } +} diff --git a/src/UAIModelverse/Models/RequestLogSummary.php b/src/UAIModelverse/Models/RequestLogSummary.php new file mode 100644 index 0000000..d87aa1f --- /dev/null +++ b/src/UAIModelverse/Models/RequestLogSummary.php @@ -0,0 +1,64 @@ +get("TotalRequests"); + } + + /** + * TotalRequests: 查询条件命中的总请求数 + * + * @param int $totalRequests + */ + public function setTotalRequests($totalRequests) + { + $this->set("TotalRequests", $totalRequests); + } + + /** + * FailedRequests: 查询条件命中的失败请求数 + * + * @return integer|null + */ + public function getFailedRequests() + { + return $this->get("FailedRequests"); + } + + /** + * FailedRequests: 查询条件命中的失败请求数 + * + * @param int $failedRequests + */ + public function setFailedRequests($failedRequests) + { + $this->set("FailedRequests", $failedRequests); + } +} diff --git a/src/UAIModelverse/Models/SquareModel.php b/src/UAIModelverse/Models/SquareModel.php index b4ae624..81479b9 100644 --- a/src/UAIModelverse/Models/SquareModel.php +++ b/src/UAIModelverse/Models/SquareModel.php @@ -22,6 +22,26 @@ class SquareModel extends Response { + /** + * Manufacturer: 制造商 + * + * @return string|null + */ + public function getManufacturer() + { + return $this->get("Manufacturer"); + } + + /** + * Manufacturer: 制造商 + * + * @param string $manufacturer + */ + public function setManufacturer($manufacturer) + { + $this->set("Manufacturer", $manufacturer); + } + /** * Id: 主键 * @@ -281,4 +301,36 @@ public function setPricing(array $pricing) { $this->set("Pricing", $pricing->getAll()); } + + /** + * Tiers: 价格阶梯(有序数组) + * + * @return PriceTier[]|null + */ + public function getTiers() + { + $items = $this->get("Tiers"); + if ($items == null) { + return []; + } + $result = []; + foreach ($items as $i => $item) { + array_push($result, new PriceTier($item)); + } + return $result; + } + + /** + * Tiers: 价格阶梯(有序数组) + * + * @param PriceTier[] $tiers + */ + public function setTiers(array $tiers) + { + $result = []; + foreach ($tiers as $i => $item) { + array_push($result, $item->getAll()); + } + return $result; + } } diff --git a/src/UAIModelverse/UAIModelverseClient.php b/src/UAIModelverse/UAIModelverseClient.php index 06c4806..4e71da5 100644 --- a/src/UAIModelverse/UAIModelverseClient.php +++ b/src/UAIModelverse/UAIModelverseClient.php @@ -28,26 +28,36 @@ use UCloud\UAIModelverse\Apis\DownloadListUnpaidOrdersResponse; use UCloud\UAIModelverse\Apis\DownloadOrderSummaryRequest; use UCloud\UAIModelverse\Apis\DownloadOrderSummaryResponse; +use UCloud\UAIModelverse\Apis\DownloadUMInferRequestLogRequest; +use UCloud\UAIModelverse\Apis\DownloadUMInferRequestLogResponse; use UCloud\UAIModelverse\Apis\GetFilterOptionsRequest; use UCloud\UAIModelverse\Apis\GetFilterOptionsResponse; use UCloud\UAIModelverse\Apis\GetOrderAmountRequest; use UCloud\UAIModelverse\Apis\GetOrderAmountResponse; -use UCloud\UAIModelverse\Apis\GetUMInferAPIModelRequest; -use UCloud\UAIModelverse\Apis\GetUMInferAPIModelResponse; -use UCloud\UAIModelverse\Apis\GetUMInferTokenUsageRequest; -use UCloud\UAIModelverse\Apis\GetUMInferTokenUsageResponse; +use UCloud\UAIModelverse\Apis\GetUFSquareModelDetailRequest; +use UCloud\UAIModelverse\Apis\GetUFSquareModelDetailResponse; +use UCloud\UAIModelverse\Apis\GetUFSquareModelPricesRequest; +use UCloud\UAIModelverse\Apis\GetUFSquareModelPricesResponse; +use UCloud\UAIModelverse\Apis\GetUMInferRequestLogDetailRequest; +use UCloud\UAIModelverse\Apis\GetUMInferRequestLogDetailResponse; use UCloud\UAIModelverse\Apis\ListPaidOrderSummaryRequest; use UCloud\UAIModelverse\Apis\ListPaidOrderSummaryResponse; use UCloud\UAIModelverse\Apis\ListPaidOrdersRequest; use UCloud\UAIModelverse\Apis\ListPaidOrdersResponse; use UCloud\UAIModelverse\Apis\ListUFSquareModelRequest; use UCloud\UAIModelverse\Apis\ListUFSquareModelResponse; +use UCloud\UAIModelverse\Apis\ListUFSquareModelFiltersAuthRequest; +use UCloud\UAIModelverse\Apis\ListUFSquareModelFiltersAuthResponse; use UCloud\UAIModelverse\Apis\ListUMInferAPIKeyRequest; use UCloud\UAIModelverse\Apis\ListUMInferAPIKeyResponse; +use UCloud\UAIModelverse\Apis\ListUMInferRequestLogsRequest; +use UCloud\UAIModelverse\Apis\ListUMInferRequestLogsResponse; use UCloud\UAIModelverse\Apis\ListUnpaidOrderSummaryRequest; use UCloud\UAIModelverse\Apis\ListUnpaidOrderSummaryResponse; use UCloud\UAIModelverse\Apis\ListUnpaidOrdersRequest; use UCloud\UAIModelverse\Apis\ListUnpaidOrdersResponse; +use UCloud\UAIModelverse\Apis\StartPayUnpaidOrdersRequest; +use UCloud\UAIModelverse\Apis\StartPayUnpaidOrdersResponse; use UCloud\UAIModelverse\Apis\UpdateUMInferAPIKeyRequest; use UCloud\UAIModelverse\Apis\UpdateUMInferAPIKeyResponse; @@ -256,6 +266,41 @@ public function downloadOrderSummary(DownloadOrderSummaryRequest $request = null return new DownloadOrderSummaryResponse($resp->toArray(), $resp->getRequestId()); } + /** + * DownloadUMInferRequestLog - 导出推理请求日志。单次导出时间范围最长 30 天,最多导出 2000 万条日志;同一 TopOrganizationID 同一时间仅允许 1 个导出任务在执行,已有任务执行中时请稍后重试。 + * + * See also: https://docs.ucloud.cn/api/uai-modelverse-api/download_um_infer_request_log + * + * Arguments: + * + * $args = [ + * "Region" => (string) 业务地域,如 cn-wlcb。可先调用 ListUMInferRegions 获取可选地域 + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。请参考 [GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "StartTime" => (integer) 导出开始时间,Unix 毫秒时间戳 + * "EndTime" => (integer) 导出结束时间,Unix 毫秒时间戳,最长支持 30 天范围 + * "Email" => (string) 接收导出结果的邮箱地址 + * "ModelNames" => (array) 模型名称列表,用于过滤 + * "ApiKeyIds" => (array) API Key ID 列表,用于过滤 + * "RequestId" => (string) 请求 ID,用于精确过滤 + * ] + * + * Outputs: + * + * $outputs = [ + * "TaskId" => (string) 导出任务 ID + * "TotalCount" => (integer) 本次导出查询命中的日志行数 + * ] + * + * @return DownloadUMInferRequestLogResponse + * @throws UCloudException + */ + public function downloadUMInferRequestLog(DownloadUMInferRequestLogRequest $request = null) + { + $resp = $this->invoke($request); + return new DownloadUMInferRequestLogResponse($resp->toArray(), $resp->getRequestId()); + } + /** * GetFilterOptions - 查询可用于订单筛选的资源、模型、地域等选项列表 * @@ -380,93 +425,177 @@ public function getOrderAmount(GetOrderAmountRequest $request = null) } /** - * GetUMInferAPIModel - 获取该apikey能调用api的模型列表 + * GetUFSquareModelDetail - 获取广场模型详情 * - * See also: https://docs.ucloud.cn/api/uai-modelverse-api/get_um_infer_api_model + * See also: https://docs.ucloud.cn/api/uai-modelverse-api/get_uf_square_model_detail * * Arguments: * * $args = [ + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) - * "KeyId" => (string) apikey 的id - * "ModelType" => (integer) 模型类型,1: 文本生成,2: 图片生成。 - * "SquareId" => (string) 模型广场的id,用来跳转体验中心 + * "Id" => (string) 主键 * ] * * Outputs: * * $outputs = [ - * "Data" => (array) 模型名称的字符串列表[ - * [ - * "ServedModelName" => (string) 使用OpenAI接口调用时,填入的 model值 - * "Id" => (string) id - * "Name" => (string) 名称 - * "SimpleDescribe" => (string) 描述 - * "Language" => (array) 语言 - * "Icon" => (string) 图标链接 - * "Pricing" => (object) 模型价格[ - * "Completion" => (number) 输出定价 - * "Prompt" => (number) 提示词定价 - * "Image" => (number) 生图定价 - * "Currency" => (string) 币种 + * "SquareModel" => (object) 模型[ + * "Manufacturer" => (string) 制造商 + * "Id" => (string) 主键 + * "Name" => (string) 名称 + * "SimpleDescribe" => (string) 简要描述 + * "Describe" => (string) 详细描述 + * "Language" => (array) 语言 + * "MaxModelLen" => (integer) 模型长度 + * "ModelType" => (string) 模型类型 + * "HfUpdateTime" => (integer) HuggingFace 更新时间 + * "CreateAt" => (integer) 创建时间 + * "UpdateAt" => (integer) 更新时间 + * "SupportedCapabilities" => (array) 模型能力 + * "Icon" => (string) 图标 + * "Pricing" => (object) 定价策略[ + * "Completion" => (number) 输出定价 + * "Prompt" => (number) 提示词定价 + * "Image" => (number) 生图定价 + * "Video" => (string) 生视频定价 + * "Currency" => (string) 币种 + * "Unit" => (string) 单位(中文),如“次” “百万” + * "UnitEn" => (string) 单位(English),如“Time” “Million” + * ] + * "Tiers" => (array) 价格阶梯(有序数组)[ + * [ + * "Rates" => (array) 该档位下的收费列表(有序数组)[ + * [ + * "ChargeItemDescriptionEn" => (string) 收费项描述英文描述 + * "Currency" => (string) 货币单位 + * "Unit" => (string) 计价单位 + * "UnitEn" => (string) 计价单位英文 + * "ChargeItem" => (string) 收费项:input/output/thinking/tool... + * "ChargeItemDescription" => (string) 收费项描述 + * "Price" => (string) 价格 + * ] + * ] + * "DescriptionEn" => (string) 档位描述(例如 "标准上下文 32k") + * "Condition" => (string) 档位/条件(例如 "32k"、"128k") + * "Description" => (string) 档位描述(例如 "标准上下文 32k") * ] - * "CreateAt" => (integer) 创建时间 - * "UpdateAt" => (integer) 更新时间 * ] * ] * ] * - * @return GetUMInferAPIModelResponse + * @return GetUFSquareModelDetailResponse * @throws UCloudException */ - public function getUMInferAPIModel(GetUMInferAPIModelRequest $request = null) + public function getUFSquareModelDetail(GetUFSquareModelDetailRequest $request = null) { $resp = $this->invoke($request); - return new GetUMInferAPIModelResponse($resp->toArray(), $resp->getRequestId()); + return new GetUFSquareModelDetailResponse($resp->toArray(), $resp->getRequestId()); } /** - * GetUMInferTokenUsage - 获取某个key下的某个模型的token使用量 + * GetUFSquareModelPrices - 批量查询模型价格 * - * See also: https://docs.ucloud.cn/api/uai-modelverse-api/get_um_infer_token_usage + * See also: https://docs.ucloud.cn/api/uai-modelverse-api/get_uf_square_model_prices * * Arguments: * * $args = [ - * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) - * "KeyId" => (string) apikey的id - * "Model" => (string) 模型名称 - * "StartTime" => (integer) 开始时间戳 - * "EndTime" => (integer) 结束时间戳 + * "Keyword" => (string) 模型名称模糊搜索(例:deepseek-r1) + * "Offset" => (integer) 列表起始位置偏移量,默认为0 + * "Limit" => (integer) 返回数据长度,默认为20 * ] * * Outputs: * * $outputs = [ - * "Data" => (object) token使用详情[ - * "Total" => (integer) 总token量 - * "InTotal" => (integer) 输出总token - * "OutTotal" => (integer) 输出总token - * "ImageGenerationNum" => (integer) 生图总张数 - * "RequestTotal" => (integer) 请求总次数 - * "Usages" => (array) 每个时间戳的token使用量[ - * [ - * "Type" => (string) 类型,in输入 out输出 total总 request_count 请求次数 image_generation 生图张数 - * "Count" => (integer) 数量 - * "Timestamp" => (integer) unix时间戳 - * "Model" => (string) 模型名称 + * "Models" => (array) 匹配模型的价格信息[ + * [ + * "Manufacturer" => (string) 制造商 + * "ModelName" => (string) 模型名称 + * "ModelId" => (string) ModelId + * "Tiers" => (array) 价格阶梯(有序数组)[ + * [ + * "Rates" => (array) 该档位下的收费列表(有序数组)[ + * [ + * "ChargeItemDescriptionEn" => (string) 收费项描述英文描述 + * "Currency" => (string) 货币单位 + * "Unit" => (string) 计价单位 + * "UnitEn" => (string) 计价单位英文 + * "ChargeItem" => (string) 收费项:input/output/thinking/tool... + * "ChargeItemDescription" => (string) 收费项描述 + * "Price" => (string) 价格 + * ] + * ] + * "DescriptionEn" => (string) 档位描述(例如 "标准上下文 32k") + * "Condition" => (string) 档位/条件(例如 "32k"、"128k") + * "Description" => (string) 档位描述(例如 "标准上下文 32k") + * ] * ] * ] * ] + * "TotalCount" => (integer) 总条数用于翻页 + * ] + * + * @return GetUFSquareModelPricesResponse + * @throws UCloudException + */ + public function getUFSquareModelPrices(GetUFSquareModelPricesRequest $request = null) + { + $resp = $this->invoke($request); + return new GetUFSquareModelPricesResponse($resp->toArray(), $resp->getRequestId()); + } + + /** + * GetUMInferRequestLogDetail - 原始日志详情 + * + * See also: https://docs.ucloud.cn/api/uai-modelverse-api/get_um_infer_request_log_detail + * + * Arguments: + * + * $args = [ + * "Region" => (string) 业务地域,如 cn-wlcb。可先调用 ListUMInferRegions 获取可选地域 + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。请参考 [GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "RequestId" => (string) 请求 ID + * ] + * + * Outputs: + * + * $outputs = [ + * "Data" => (object) 请求日志详情[ + * "RequestId" => (string) 请求 ID + * "TopOrganizationId" => (string) 顶级组织 ID + * "OrganizationId" => (string) 组织 ID + * "ClientIp" => (string) 客户端 IP + * "Region" => (string) 业务地域 + * "StartTime" => (integer) 请求开始时间,Unix 毫秒时间戳 + * "StartTimeReadable" => (string) 请求开始时间,可读格式 + * "ModelName" => (string) 模型名称 + * "IsStream" => (boolean) 是否流式请求 + * "ApiKeyId" => (string) API Key ID + * "HttpStatusCode" => (integer) HTTP 状态码 + * "ErrorCode" => (string) 错误码 + * "ErrorMessage" => (string) 错误信息 + * "IsSuccess" => (boolean) 请求是否成功 + * "Latency" => (integer) 请求总延迟,单位毫秒 + * "FirstTokenLatency" => (integer) 首 Token 延迟,单位毫秒 + * "OutputTokenThroughput" => (number) 输出 Token 吞吐 + * "Usage" => (string) 模型返回的 usage 原文 JSON + * "Request" => (string) 请求原文,本期返回为空 + * "Response" => (string) 响应原文,本期返回为空 + * "Extras" => (string) 扩展信息,本期返回为空 + * ] * ] * - * @return GetUMInferTokenUsageResponse + * @return GetUMInferRequestLogDetailResponse * @throws UCloudException */ - public function getUMInferTokenUsage(GetUMInferTokenUsageRequest $request = null) + public function getUMInferRequestLogDetail(GetUMInferRequestLogDetailRequest $request = null) { $resp = $this->invoke($request); - return new GetUMInferTokenUsageResponse($resp->toArray(), $resp->getRequestId()); + return new GetUMInferRequestLogDetailResponse($resp->toArray(), $resp->getRequestId()); } /** @@ -637,6 +766,7 @@ public function listPaidOrders(ListPaidOrdersRequest $request = null) * "TotalCount" => (integer) 总数 * "SquareModels" => (array) 广场模型[ * [ + * "Manufacturer" => (string) 制造商 * "Id" => (string) 主键 * "Name" => (string) 名称 * "SimpleDescribe" => (string) 简要描述 @@ -653,7 +783,28 @@ public function listPaidOrders(ListPaidOrdersRequest $request = null) * "Completion" => (number) 输出定价 * "Prompt" => (number) 提示词定价 * "Image" => (number) 生图定价 + * "Video" => (string) 生视频定价 * "Currency" => (string) 币种 + * "Unit" => (string) 单位(中文),如“次” “百万” + * "UnitEn" => (string) 单位(English),如“Time” “Million” + * ] + * "Tiers" => (array) 价格阶梯(有序数组)[ + * [ + * "Rates" => (array) 该档位下的收费列表(有序数组)[ + * [ + * "ChargeItemDescriptionEn" => (string) 收费项描述英文描述 + * "Currency" => (string) 货币单位 + * "Unit" => (string) 计价单位 + * "UnitEn" => (string) 计价单位英文 + * "ChargeItem" => (string) 收费项:input/output/thinking/tool... + * "ChargeItemDescription" => (string) 收费项描述 + * "Price" => (string) 价格 + * ] + * ] + * "DescriptionEn" => (string) 档位描述(例如 "标准上下文 32k") + * "Condition" => (string) 档位/条件(例如 "32k"、"128k") + * "Description" => (string) 档位描述(例如 "标准上下文 32k") + * ] * ] * ] * ] @@ -668,6 +819,33 @@ public function listUFSquareModel(ListUFSquareModelRequest $request = null) return new ListUFSquareModelResponse($resp->toArray(), $resp->getRequestId()); } + /** + * ListUFSquareModelFiltersAuth - 登录状态下获取模型广场过滤器中内容 + * + * See also: https://docs.ucloud.cn/api/uai-modelverse-api/list_uf_square_model_filters_auth + * + * Arguments: + * + * $args = [ + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。 请参考[GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "Region" => (string) 地域。 参见 [地域和可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * ] + * + * Outputs: + * + * $outputs = [ + * ] + * + * @return ListUFSquareModelFiltersAuthResponse + * @throws UCloudException + */ + public function listUFSquareModelFiltersAuth(ListUFSquareModelFiltersAuthRequest $request = null) + { + $resp = $this->invoke($request); + return new ListUFSquareModelFiltersAuthResponse($resp->toArray(), $resp->getRequestId()); + } + /** * ListUMInferAPIKey - 列表查询apikey * @@ -719,6 +897,71 @@ public function listUMInferAPIKey(ListUMInferAPIKeyRequest $request = null) return new ListUMInferAPIKeyResponse($resp->toArray(), $resp->getRequestId()); } + /** + * ListUMInferRequestLogs - 日志明细列表 + * + * See also: https://docs.ucloud.cn/api/uai-modelverse-api/list_um_infer_request_logs + * + * Arguments: + * + * $args = [ + * "Region" => (string) 业务地域,如 cn-wlcb。可先调用 ListUMInferRegions 获取可选地域 + * "Zone" => (string) 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist) + * "ProjectId" => (string) 项目ID。不填写为默认项目,子帐号必须填写。请参考 [GetProjectList接口](https://docs.ucloud.cn/api/summary/get_project_list) + * "StartTime" => (integer) 查询开始时间,Unix 毫秒时间戳 + * "EndTime" => (integer) 查询结束时间,Unix 毫秒时间戳,必须大于等于 StartTime + * "ModelNames" => (array) 模型名称列表,用于过滤 + * "ApiKeyIds" => (array) API Key ID 列表,用于过滤 + * "RequestId" => (string) 请求 ID,用于精确过滤 + * "Offset" => (integer) 列表偏移量,默认 0 + * "Limit" => (integer) 返回数量,默认 20 + * ] + * + * Outputs: + * + * $outputs = [ + * "Data" => (object) 日志明细列表返回数据[ + * "Summary" => (object) 汇总信息[ + * "TotalRequests" => (integer) 查询条件命中的总请求数 + * "FailedRequests" => (integer) 查询条件命中的失败请求数 + * ] + * "Items" => (array) 日志列表,数组元素为 RequestLogItem[ + * [ + * "RequestId" => (string) 请求 ID + * "StartTime" => (integer) 请求开始时间,Unix 毫秒时间戳 + * "StartTimeReadable" => (string) 请求开始时间,可读格式 + * "Region" => (string) 业务地域 + * "ModelName" => (string) 模型名称 + * "ApiKeyId" => (string) API Key ID + * "ApiKeyName" => (string) API Key 名称 + * "Latency" => (integer) 请求总延迟,单位毫秒 + * "FirstTokenLatency" => (integer) 首 Token 延迟,单位毫秒 + * "OutputTokenThroughput" => (number) 输出 Token 吞吐 + * "HttpStatusCode" => (integer) HTTP 状态码 + * "ErrorCode" => (string) 错误码 + * "IsSuccess" => (boolean) 请求是否成功 + * "TotalTokens" => (integer) 总 Token 数 + * "PromptTokens" => (integer) 输入 Token 数 + * "CompletionTokens" => (integer) 输出 Token 数 + * "CacheHitTokens" => (integer) 缓存命中 Token 数 + * "CacheCreationTokens" => (integer) 缓存写入 Token 数 + * "CacheCreation5mTokens" => (integer) 5 分钟缓存写入 Token 数 + * "CacheCreation1hTokens" => (integer) 1 小时缓存写入 Token 数 + * "HasInferenceLog" => (boolean) 是否存在推理日志 + * ] + * ] + * ] + * ] + * + * @return ListUMInferRequestLogsResponse + * @throws UCloudException + */ + public function listUMInferRequestLogs(ListUMInferRequestLogsRequest $request = null) + { + $resp = $this->invoke($request); + return new ListUMInferRequestLogsResponse($resp->toArray(), $resp->getRequestId()); + } + /** * ListUnpaidOrderSummary - 按指定维度汇总查询欠费订单的统计数据 * @@ -855,6 +1098,38 @@ public function listUnpaidOrders(ListUnpaidOrdersRequest $request = null) return new ListUnpaidOrdersResponse($resp->toArray(), $resp->getRequestId()); } + /** + * StartPayUnpaidOrders - 批量支付欠费订单,指定 OrderNos 支付,最多 50 个 + * + * See also: https://docs.ucloud.cn/api/uai-modelverse-api/start_pay_unpaid_orders + * + * Arguments: + * + * $args = [ + * "OrderNos" => (array) 欠费订单号列表,最多 50 个 + * ] + * + * Outputs: + * + * $outputs = [ + * "SuccessCount" => (integer) 支付成功数量 + * "FailureCount" => (integer) 支付失败数量 + * "Results" => (object) 支付结果[ + * "OrderNo" => (string) 订单号 + * "Success" => (boolean) 是否支付成功 + * "Reason" => (string) 失败原因(成功时为空) + * ] + * ] + * + * @return StartPayUnpaidOrdersResponse + * @throws UCloudException + */ + public function startPayUnpaidOrders(StartPayUnpaidOrdersRequest $request = null) + { + $resp = $this->invoke($request); + return new StartPayUnpaidOrdersResponse($resp->toArray(), $resp->getRequestId()); + } + /** * UpdateUMInferAPIKey - 更新apikey *