Documentation
¶
Overview ¶
智谱 CogView-3 系列模型 SDK
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
CogView-3 Client 客户端
type ContentFilter ¶
type ContentFilter struct {
// 安全生效环节,包括
// role = assistant 模型推理,
// role = user 用户输入,
// role = history 历史上下文
Role public.ContentFilterRole `json:"role"`
Level public.ContentFilterLevel `json:"level"` // 严重程度 level 0-3,level 0表示最严重,3表示轻微
}
返回内容安全的相关信息
type Request ¶
type Request struct {
Model public.Model `json:"model"` // 要调用的模型编码
Prompt string `json:"prompt"` // 所需图像的文本描述
// 图片尺寸, cogview-3-plus 、cogview-3-flash支持该参数。
// 可选范围:[1024x1024,768x1344,864x1152,1344x768,1152x864,1440x720,720x1440],默认是1024x1024
Size public.GenerateImageSize `json:"size,omitempty"`
// 终端用户的唯一 ID
// 帮助平台对终端用户的非法活动、生成非法不当信息或其他滥用行为进行干预;
// ID 长度要求:至少 6 个字符,最多 128 个字符
UserID string `json:"user_id,omitempty"`
}
请求对象
type Response ¶
type Response struct {
Created uint64 `json:"created"` // 请求创建时间,为 Unix 时间戳,单位为秒
Data []*Data `json:"data"` // 数组,包含生成的图片 URL。目前数组中只包含一张图片
ContentFilter []*ContentFilter `json:"content_filter"` // 返回内容安全的相关信息
}
同步响应对象
Click to show internal directories.
Click to hide internal directories.