Skip to content

Commit 06b9930

Browse files
authored
sdk: rolling update for 0.11.118 (#351)
1 parent 67c2b2e commit 06b9930

7 files changed

Lines changed: 1509 additions & 1 deletion

File tree

‎ucloud/services/uai_modelverse/client.py‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ def create_um_infer_api_key(
2828
- **GrantAllModels** (bool) - 全部模型访问开关,开启不受 GrantedModels 参数控制,关闭只能访问 GrantedModels 中添加模型
2929
- **GrantedModels** (str) - 授权模型,内容为数组格式。当 GrantAllModels 为false时 当前key只可访问数组中模型。例:["deepseek-ai/DeepSeek-V3.2-Think"]
3030
- **IPWhitelist** (str) - ip白名单,换行分割的多组ip。支持IPv4和网段,输入后回车生效,最多100个, 示例:192.168.1.1192.168.1.10-192.168.1.100192.168.1.10/24
31+
- **InferenceLogEnabled** (int) - 是否开启推理日志
3132
- **ModelverseDisabled** (int) - 是否modelverse可用 0: 启用 1: 禁用
3233
- **MonthlyLimitAmount** (str) - 月限额,单位随用户所在渠道。126渠道单位为美元
3334
- **SandBoxDisabled** (int) - 是否沙盒可用 0: 启用 1: 禁用(astraflow 沙盒控制未上线,暂时无效)
@@ -43,14 +44,17 @@ def create_um_infer_api_key(
4344
- **ChannelId** (int) - 渠道id
4445
- **CreateTime** (int) - 创建时间
4546
- **DailyLimitAmount** (str) - 日限额,单位随用户所在渠道。126渠道单位为美元
47+
- **DailyUsedAmount** (str) - 日已使用额,单位随用户所在渠道。126渠道单位为美元
4648
- **ExpireTime** (int) - 过期时间的unix时间戳,-1 用不过期
4749
- **GrantAllModels** (bool) - 全部模型访问开关,开启不受 GrantedModels 参数控制,关闭只能访问 GrantedModels 中添加模型
4850
- **GrantedModels** (list) - 授权的模型,英文逗号分隔,all表示所有模型都有权限
4951
- **IPWhitelist** (str) - ip白名单,换行分割的多组ip。支持IPv4和网段,输入后回车生效,最多100个, 示例:  192.168.1.1 192.168.1.10-192.168.1.100 192.168.1.10/24
52+
- **InferenceLogEnabled** (int) - 是否开启推理日志
5053
- **Key** (str) - 密钥值
5154
- **KeyId** (str) - 资源ID
5255
- **ModelverseDisabled** (int) - 是否modelverse可用 0: 启用 1: 禁用
5356
- **MonthlyLimitAmount** (str) - 月限额,单位随用户所在渠道。126渠道单位为美元
57+
- **MonthlyUsedAmount** (str) - 月已使用额,单位随用户所在渠道。126渠道单位为美元
5458
- **Name** (str) - 名称
5559
- **OrganizationId** (int) - 项目id
5660
- **SandBoxDisabled** (int) - 是否沙盒可用 0: 启用 1: 禁用(astraflow 沙盒控制未上线,暂时无效)
@@ -757,9 +761,11 @@ def list_uf_square_model(
757761
758762
- **ProjectId** (str) - (Config) 项目ID。不填写为默认项目,子帐号必须填写。 请参考 `GetProjectList接口 <https://docs.ucloud.cn/api/summary/get_project_list>`_
759763
- **Region** (str) - (Config) 地域。 参见 `地域和可用区列表 <https://docs.ucloud.cn/api/summary/regionlist>`_
764+
- **Capabilities** (list) - 模型特性,可选值来源于ListUFSquareModelFilters枚举接口。可多选
760765
- **Keyword** (str) - 关键字
761766
- **Language** (list) - 语言,数组类型,可选值 ["chinese", "english"]
762767
- **Limit** (int) - 每页数量
768+
- **Manufacturer** (list) - 制造商,可选值来源于ListUFSquareModelFilters枚举接口。可多选
763769
- **MaxModelLen** (list) - 上下文长度,数组类型,可选值 [0,4096,16384,32768,131072,256000,262144,1048576]
764770
- **ModelType** (str) - 模型类型
765771
- **Offset** (int) - 偏移量
@@ -779,21 +785,46 @@ def list_uf_square_model(
779785
- **Currency** (str) - 币种
780786
- **Image** (float) - 生图定价
781787
- **Prompt** (float) - 提示词定价
788+
- **Unit** (str) - 单位(中文),如“次” “百万”
789+
- **UnitEn** (str) - 单位(English),如“Time” “Million”
790+
- **Video** (str) - 生视频定价
791+
792+
793+
**PriceRate**
794+
- **ChargeItem** (str) - 收费项:input/output/thinking/tool...
795+
- **ChargeItemDescription** (str) - 收费项描述
796+
- **ChargeItemDescriptionEn** (str) - 收费项描述英文描述
797+
- **Currency** (str) - 货币单位
798+
- **Price** (str) - 价格
799+
- **Unit** (str) - 计价单位
800+
- **UnitEn** (str) - 计价单位英文
801+
802+
803+
**PriceTier**
804+
- **Condition** (str) - 档位/条件(例如 "32k"、"128k")
805+
- **Description** (str) - 档位描述(例如 "标准上下文 32k")
806+
- **DescriptionEn** (str) - 档位描述(例如 "标准上下文 32k")
807+
- **Rates** (list) - 见 **PriceRate** 模型定义
782808
783809
784810
**SquareModel**
811+
- **BatchName** (str) - 关联的 batch 模型名称
812+
- **BatchSquareModelId** (str) - 关联的 batch 模型广场id
785813
- **CreateAt** (int) - 创建时间
786814
- **Describe** (str) - 详细描述
787815
- **HfUpdateTime** (int) - HuggingFace 更新时间
788816
- **Icon** (str) - 图标
789817
- **Id** (str) - 主键
818+
- **IsHasBatch** (bool) - 是否关联有可用 batch 模型
790819
- **Language** (list) - 语言
820+
- **Manufacturer** (str) - 制造商
791821
- **MaxModelLen** (int) - 模型长度
792822
- **ModelType** (str) - 模型类型
793823
- **Name** (str) - 名称
794824
- **Pricing** (dict) - 见 **Pricing** 模型定义
795825
- **SimpleDescribe** (str) - 简要描述
796826
- **SupportedCapabilities** (list) - 模型能力
827+
- **Tiers** (list) - 见 **PriceTier** 模型定义
797828
- **UpdateAt** (int) - 更新时间
798829
799830
@@ -1133,6 +1164,7 @@ def update_um_infer_api_key(
11331164
- **GrantAllModels** (bool) - 全部模型访问开关,开启不受 GrantedModels 参数控制,关闭只能访问 GrantedModels 中添加模型
11341165
- **GrantedModels** (str) - 授权模型,内容为数组格式。当 GrantAllModels 为false时 当前key只可访问数组中模型。例:["deepseek-ai/DeepSeek-V3.2-Think"]
11351166
- **IPWhitelist** (str) - ip白名单,换行分割的多组ip。支持IPv4和网段,输入后回车生效,最多100个, 示例:  192.168.1.1 192.168.1.10-192.168.1.100 192.168.1.10/24
1167+
- **InferenceLogEnabled** (int) - 是否开启推理日志
11361168
- **ModelverseDisabled** (int) - 是否modelverse可用 0: 启用 1: 禁用
11371169
- **MonthlyLimitAmount** (str) - 月限额,单位随用户所在渠道。126渠道单位为美元
11381170
- **Name** (str) - 更新的名称

‎ucloud/services/uai_modelverse/schemas/apis.py‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ class CreateUMInferAPIKeyRequestSchema(schema.RequestSchema):
2424
"GrantAllModels": fields.Bool(required=False, dump_to="GrantAllModels"),
2525
"GrantedModels": fields.Str(required=False, dump_to="GrantedModels"),
2626
"IPWhitelist": fields.Str(required=False, dump_to="IPWhitelist"),
27+
"InferenceLogEnabled": fields.Int(
28+
required=False, dump_to="InferenceLogEnabled"
29+
),
2730
"ModelverseDisabled": fields.Int(
2831
required=False, dump_to="ModelverseDisabled"
2932
),
@@ -534,9 +537,11 @@ class ListUFSquareModelRequestSchema(schema.RequestSchema):
534537
"""ListUFSquareModel - 查询模型广场数据"""
535538

536539
fields = {
540+
"Capabilities": fields.List(fields.Str()),
537541
"Keyword": fields.Str(required=False, dump_to="Keyword"),
538542
"Language": fields.List(fields.Str()),
539543
"Limit": fields.Int(required=False, dump_to="Limit"),
544+
"Manufacturer": fields.List(fields.Str()),
540545
"MaxModelLen": fields.List(fields.Int()),
541546
"ModelType": fields.Str(required=False, dump_to="ModelType"),
542547
"Offset": fields.Int(required=False, dump_to="Offset"),
@@ -760,6 +765,9 @@ class UpdateUMInferAPIKeyRequestSchema(schema.RequestSchema):
760765
"GrantAllModels": fields.Bool(required=False, dump_to="GrantAllModels"),
761766
"GrantedModels": fields.Str(required=False, dump_to="GrantedModels"),
762767
"IPWhitelist": fields.Str(required=False, dump_to="IPWhitelist"),
768+
"InferenceLogEnabled": fields.Int(
769+
required=False, dump_to="InferenceLogEnabled"
770+
),
763771
"KeyId": fields.Str(required=True, dump_to="KeyId"),
764772
"ModelverseDisabled": fields.Int(
765773
required=False, dump_to="ModelverseDisabled"

‎ucloud/services/uai_modelverse/schemas/models.py‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,19 +111,28 @@ class PricingSchema(schema.ResponseSchema):
111111
"Currency": fields.Str(required=False, load_from="Currency"),
112112
"Image": fields.Float(required=False, load_from="Image"),
113113
"Prompt": fields.Float(required=False, load_from="Prompt"),
114+
"Unit": fields.Str(required=False, load_from="Unit"),
115+
"UnitEn": fields.Str(required=False, load_from="UnitEn"),
116+
"Video": fields.Str(required=False, load_from="Video"),
114117
}
115118

116119

117120
class SquareModelSchema(schema.ResponseSchema):
118121
"""SquareModel - 广场模型"""
119122

120123
fields = {
124+
"BatchName": fields.Str(required=False, load_from="BatchName"),
125+
"BatchSquareModelId": fields.Str(
126+
required=True, load_from="BatchSquareModelId"
127+
),
121128
"CreateAt": fields.Int(required=False, load_from="CreateAt"),
122129
"Describe": fields.Str(required=False, load_from="Describe"),
123130
"HfUpdateTime": fields.Int(required=False, load_from="HfUpdateTime"),
124131
"Icon": fields.Str(required=False, load_from="Icon"),
125132
"Id": fields.Str(required=False, load_from="Id"),
133+
"IsHasBatch": fields.Bool(required=False, load_from="IsHasBatch"),
126134
"Language": fields.List(fields.Str()),
135+
"Manufacturer": fields.Str(required=False, load_from="Manufacturer"),
127136
"MaxModelLen": fields.Int(required=False, load_from="MaxModelLen"),
128137
"ModelType": fields.Str(required=False, load_from="ModelType"),
129138
"Name": fields.Str(required=False, load_from="Name"),
@@ -132,6 +141,7 @@ class SquareModelSchema(schema.ResponseSchema):
132141
required=False, load_from="SimpleDescribe"
133142
),
134143
"SupportedCapabilities": fields.List(fields.Str()),
144+
"Tiers": fields.List(PriceTierSchema()),
135145
"UpdateAt": fields.Int(required=False, load_from="UpdateAt"),
136146
}
137147

0 commit comments

Comments
 (0)