uai_modelverse

package
v0.22.64 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package uai_modelverse include resources of ucloud uai_modelverse product

See also

for detail.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIKey added in v0.22.46

type APIKey struct {

	// 渠道id
	ChannelId int

	// 创建时间
	CreateTime int

	// 过期时间的unix时间戳,-1 用不过期
	ExpireTime int

	// 授权的模型,英文逗号分隔,all表示所有模型都有权限
	GrantedModels string

	// 密钥值
	Key string

	// 资源ID
	KeyId string

	// 名称
	Name string

	// 项目id
	OrganizationId int

	// 状态,1 正常
	Status int

	// 公司id
	TopOrganizationId int
}

APIKey - apikey

type CreateUMInferAPIKeyRequest added in v0.22.46

type CreateUMInferAPIKeyRequest struct {
	request.CommonBase

	// apikey名称
	Name *string `required:"true"`
}

CreateUMInferAPIKeyRequest is request schema for CreateUMInferAPIKey action

type CreateUMInferAPIKeyResponse added in v0.22.46

type CreateUMInferAPIKeyResponse struct {
	response.CommonBase

	// apikey
	Data APIKey
}

CreateUMInferAPIKeyResponse is response schema for CreateUMInferAPIKey action

type DeleteUMInferAPIKeyRequest added in v0.22.46

type DeleteUMInferAPIKeyRequest struct {
	request.CommonBase

	// 要删除的apikey id
	KeyId *string `required:"true"`
}

DeleteUMInferAPIKeyRequest is request schema for DeleteUMInferAPIKey action

type DeleteUMInferAPIKeyResponse added in v0.22.46

type DeleteUMInferAPIKeyResponse struct {
	response.CommonBase

	// apikey 的资源ID
	UminferID string
}

DeleteUMInferAPIKeyResponse is response schema for DeleteUMInferAPIKey action

type GetUMInferAPIModelRequest added in v0.22.46

type GetUMInferAPIModelRequest struct {
	request.CommonBase

	// apikey 的id
	KeyId *string `required:"false"`

	// 模型类型,1: 文本生成,2: 图片生成。
	ModelType *int `required:"false"`

	// 模型广场的id,用来跳转体验中心
	SquareId *string `required:"false"`
}

GetUMInferAPIModelRequest is request schema for GetUMInferAPIModel action

type GetUMInferAPIModelResponse added in v0.22.46

type GetUMInferAPIModelResponse struct {
	response.CommonBase

	// 模型名称的字符串列表
	Data []UMinferAPIModel
}

GetUMInferAPIModelResponse is response schema for GetUMInferAPIModel action

type GetUMInferServiceRequest added in v0.22.46

type GetUMInferServiceRequest struct {
	request.CommonBase

	// limit
	Limit *string `required:"false"`

	// offset
	Offset *string `required:"false"`

	// 推理服务id
	UminferID *string `required:"false"`

	// 默认preDeploy,可获取DeepSeek Key
	UminferType *string `required:"false"`
}

GetUMInferServiceRequest is request schema for GetUMInferService action

type GetUMInferServiceResponse added in v0.22.46

type GetUMInferServiceResponse struct {
	response.CommonBase

	// 推理服务数据
	Data []UMInferServiceData

	// 模型数量
	TotalCount int
}

GetUMInferServiceResponse is response schema for GetUMInferService action

type GetUMInferTokenUsageRequest added in v0.22.46

type GetUMInferTokenUsageRequest struct {
	request.CommonBase

	// 结束时间戳
	EndTime *int `required:"true"`

	// apikey的id
	KeyId *string `required:"true"`

	// 模型名称
	Model *string `required:"true"`

	// 开始时间戳
	StartTime *int `required:"true"`
}

GetUMInferTokenUsageRequest is request schema for GetUMInferTokenUsage action

type GetUMInferTokenUsageResponse added in v0.22.46

type GetUMInferTokenUsageResponse struct {
	response.CommonBase

	// token使用详情
	Data TokenUsage
}

GetUMInferTokenUsageResponse is response schema for GetUMInferTokenUsage action

type ListUFSquareModelLenRequest added in v0.22.46

type ListUFSquareModelLenRequest struct {
	request.CommonBase
}

ListUFSquareModelLenRequest is request schema for ListUFSquareModelLen action

type ListUFSquareModelLenResponse added in v0.22.46

type ListUFSquareModelLenResponse struct {
	response.CommonBase

	// 模型上下文长度列表
	MaxModelLens []int
}

ListUFSquareModelLenResponse is response schema for ListUFSquareModelLen action

type ListUFSquareModelRequest added in v0.22.46

type ListUFSquareModelRequest struct {
	request.CommonBase

	// 关键字
	Keyword *string `required:"false"`

	// 语言,数组类型,可选值 ["chinese", "english"]
	Language []string `required:"false"`

	// 每页数量
	Limit *int `required:"false"`

	// 上下文长度,数组类型,可选值 [0,4096,16384,32768,131072,256000,262144,1048576]
	MaxModelLen []int `required:"false"`

	// 模型类型
	ModelType *string `required:"false"`

	// 偏移量
	Offset *int `required:"false"`

	// 排序顺序,默认倒序
	Order *string `required:"false"`

	// 排序字段
	OrderBy *string `required:"false"`
}

ListUFSquareModelRequest is request schema for ListUFSquareModel action

type ListUFSquareModelResponse added in v0.22.46

type ListUFSquareModelResponse struct {
	response.CommonBase

	// 广场模型
	SquareModels []SquareModel

	// 总数
	TotalCount int
}

ListUFSquareModelResponse is response schema for ListUFSquareModel action

type ListUMInferAPIKeyRequest added in v0.22.46

type ListUMInferAPIKeyRequest struct {
	request.CommonBase

	// 返回数据长度,默认为20,最大100
	Limit *int `required:"false"`

	// 列表起始位置偏移量,默认为0
	Offset *int `required:"false"`
}

ListUMInferAPIKeyRequest is request schema for ListUMInferAPIKey action

type ListUMInferAPIKeyResponse added in v0.22.46

type ListUMInferAPIKeyResponse struct {
	response.CommonBase

	// apikey
	Data []APIKey
}

ListUMInferAPIKeyResponse is response schema for ListUMInferAPIKey action

type Pricing added in v0.22.46

type Pricing struct {

	// 输出定价
	Completion float64

	// 币种
	Currency string

	// 生图定价
	Image float64

	// 提示词定价
	Prompt float64
}

Pricing - 定价策略

type SquareModel added in v0.22.46

type SquareModel struct {

	// 创建时间
	CreateAt int

	// 详细描述
	Describe string

	// HuggingFace 更新时间
	HfUpdateTime int

	// 图标
	Icon string

	// 主键
	Id string

	// 语言
	Language []string

	// 模型长度
	MaxModelLen int

	// 模型类型
	ModelType string

	// 名称
	Name string

	// 定价策略
	Pricing Pricing

	// 简要描述
	SimpleDescribe string

	// 模型能力
	SupportedCapabilities []string

	// 更新时间
	UpdateAt int
}

SquareModel - 广场模型

type TokenUsage added in v0.22.46

type TokenUsage struct {

	// 生图总张数
	ImageGenerationNum int

	// 输出总token
	InTotal int

	// 输出总token
	OutTotal int

	// 请求总次数
	RequestTotal int

	// 总token量
	Total int

	// 每个时间戳的token使用量
	Usages []TokenUsageTimestamp
}

TokenUsage - 某个apikey的某个模型的token使用情况

type TokenUsageTimestamp added in v0.22.46

type TokenUsageTimestamp struct {

	// 数量
	Count int

	// 模型名称
	Model string

	// unix时间戳
	Timestamp int

	// 类型,in输入 out输出 total总  request_count 请求次数 image_generation 生图张数
	Type string
}

TokenUsageTimestamp - 时间戳级别的token使用量

type UAI_ModelverseClient

type UAI_ModelverseClient struct {
	*ucloud.Client
}

UAI_ModelverseClient is the client of UAI_Modelverse

func NewClient

func NewClient(config *ucloud.Config, credential *auth.Credential) *UAI_ModelverseClient

NewClient will return a instance of UAI_ModelverseClient

func (*UAI_ModelverseClient) CreateUMInferAPIKey added in v0.22.46

API: CreateUMInferAPIKey

创建apikey

func (*UAI_ModelverseClient) DeleteUMInferAPIKey added in v0.22.46

API: DeleteUMInferAPIKey

删除apikey

func (*UAI_ModelverseClient) GetUMInferAPIModel added in v0.22.46

API: GetUMInferAPIModel

获取该apikey能调用api的模型列表

func (*UAI_ModelverseClient) GetUMInferService added in v0.22.46

API: GetUMInferService

获取模型服务

func (*UAI_ModelverseClient) GetUMInferTokenUsage added in v0.22.46

API: GetUMInferTokenUsage

获取某个key下的某个模型的token使用量

func (*UAI_ModelverseClient) ListUFSquareModel added in v0.22.46

API: ListUFSquareModel

查询模型广场数据

func (*UAI_ModelverseClient) ListUFSquareModelLen added in v0.22.46

API: ListUFSquareModelLen

获取模型广场上下文长度列表

func (*UAI_ModelverseClient) ListUMInferAPIKey added in v0.22.46

API: ListUMInferAPIKey

列表查询apikey

func (*UAI_ModelverseClient) NewCreateUMInferAPIKeyRequest added in v0.22.46

func (c *UAI_ModelverseClient) NewCreateUMInferAPIKeyRequest() *CreateUMInferAPIKeyRequest

NewCreateUMInferAPIKeyRequest will create request of CreateUMInferAPIKey action.

func (*UAI_ModelverseClient) NewDeleteUMInferAPIKeyRequest added in v0.22.46

func (c *UAI_ModelverseClient) NewDeleteUMInferAPIKeyRequest() *DeleteUMInferAPIKeyRequest

NewDeleteUMInferAPIKeyRequest will create request of DeleteUMInferAPIKey action.

func (*UAI_ModelverseClient) NewGetUMInferAPIModelRequest added in v0.22.46

func (c *UAI_ModelverseClient) NewGetUMInferAPIModelRequest() *GetUMInferAPIModelRequest

NewGetUMInferAPIModelRequest will create request of GetUMInferAPIModel action.

func (*UAI_ModelverseClient) NewGetUMInferServiceRequest added in v0.22.46

func (c *UAI_ModelverseClient) NewGetUMInferServiceRequest() *GetUMInferServiceRequest

NewGetUMInferServiceRequest will create request of GetUMInferService action.

func (*UAI_ModelverseClient) NewGetUMInferTokenUsageRequest added in v0.22.46

func (c *UAI_ModelverseClient) NewGetUMInferTokenUsageRequest() *GetUMInferTokenUsageRequest

NewGetUMInferTokenUsageRequest will create request of GetUMInferTokenUsage action.

func (*UAI_ModelverseClient) NewListUFSquareModelLenRequest added in v0.22.46

func (c *UAI_ModelverseClient) NewListUFSquareModelLenRequest() *ListUFSquareModelLenRequest

NewListUFSquareModelLenRequest will create request of ListUFSquareModelLen action.

func (*UAI_ModelverseClient) NewListUFSquareModelRequest added in v0.22.46

func (c *UAI_ModelverseClient) NewListUFSquareModelRequest() *ListUFSquareModelRequest

NewListUFSquareModelRequest will create request of ListUFSquareModel action.

func (*UAI_ModelverseClient) NewListUMInferAPIKeyRequest added in v0.22.46

func (c *UAI_ModelverseClient) NewListUMInferAPIKeyRequest() *ListUMInferAPIKeyRequest

NewListUMInferAPIKeyRequest will create request of ListUMInferAPIKey action.

func (*UAI_ModelverseClient) NewUpdateUMInferAPIKeyRequest added in v0.22.46

func (c *UAI_ModelverseClient) NewUpdateUMInferAPIKeyRequest() *UpdateUMInferAPIKeyRequest

NewUpdateUMInferAPIKeyRequest will create request of UpdateUMInferAPIKey action.

func (*UAI_ModelverseClient) UpdateUMInferAPIKey added in v0.22.46

API: UpdateUMInferAPIKey

更新apikey

type UMInferServiceData added in v0.22.46

type UMInferServiceData struct {

	// 算力单元
	ComputingUnit int

	// 创建时间
	CreateTime int

	// 描述
	Describe string

	// 模型认证key
	Key string

	// 模型id
	ModelID string

	// 模型名字
	ModelName string

	// 服务名字
	Name string

	// 实际启动的副本数
	ReadyReplicas int

	// 副本数
	Replicas int

	// 服务状态
	Status string

	// 服务的url
	URL string

	// 推理服务资源id
	UminferID string

	// 推理服务资源类型
	UminferType string
}

UMInferServiceData - 获取推理服务结构体

type UMinferAPIModel added in v0.22.46

type UMinferAPIModel struct {

	// 创建时间
	CreateAt int

	// 图标链接
	Icon string

	// id
	Id string

	// 语言
	Language []string

	// 名称
	Name string

	// 模型价格
	Pricing Pricing

	// 使用OpenAI接口调用时,填入的 model值
	ServedModelName string

	// 描述
	SimpleDescribe string

	// 更新时间
	UpdateAt int
}

UMinferAPIModel - 可供api调用的model详情

type UpdateUMInferAPIKeyRequest added in v0.22.46

type UpdateUMInferAPIKeyRequest struct {
	request.CommonBase

	// apikey的id
	KeyId *string `required:"true"`

	// 更新的名称
	Name *string `required:"true"`
}

UpdateUMInferAPIKeyRequest is request schema for UpdateUMInferAPIKey action

type UpdateUMInferAPIKeyResponse added in v0.22.46

type UpdateUMInferAPIKeyResponse struct {
	response.CommonBase

	// apikey 的id
	UminferID string
}

UpdateUMInferAPIKeyResponse is response schema for UpdateUMInferAPIKey action

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL