common

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AudioQuota added in v0.5.0

type AudioQuota struct {
	BillingMethod   int     `bson:"billing_method,omitempty"   json:"billing_method,omitempty"`         // 计费方式[1:倍率, 2:固定额度]
	PromptRatio     float64 `bson:"prompt_ratio,omitempty"     json:"prompt_ratio,omitempty"     d:"1"` // 提示倍率(提问倍率)
	CompletionRatio float64 `bson:"completion_ratio,omitempty" json:"completion_ratio,omitempty" d:"1"` // 补全倍率(回答倍率)
	FixedQuota      int     `bson:"fixed_quota"                json:"fixed_quota"`                      // 固定额度
}

type FallbackConfig

type FallbackConfig struct {
	ModelAgent     string `bson:"model_agent,omitempty"      json:"model_agent,omitempty"`      // 后备模型代理
	ModelAgentName string `bson:"model_agent_name,omitempty" json:"model_agent_name,omitempty"` // 后备模型代理名称
	Model          string `bson:"model,omitempty"            json:"model,omitempty"`            // 后备模型
	ModelName      string `bson:"model_name,omitempty"       json:"model_name,omitempty"`       // 后备模型名称
}

type ForwardConfig

type ForwardConfig struct {
	ForwardRule       int      `bson:"forward_rule,omitempty"   json:"forward_rule,omitempty"`        // 转发规则[1:全部转发, 2:按关键字, 3:内容长度]
	MatchRule         []int    `bson:"match_rule,omitempty"     json:"match_rule,omitempty"`          // 转发规则为2时的匹配规则[1:智能匹配, 2:正则匹配]
	TargetModel       string   `bson:"target_model,omitempty"   json:"target_model,omitempty"`        // 转发规则为1和3时的目标模型
	DecisionModel     string   `bson:"decision_model,omitempty" json:"decision_model,omitempty"`      // 转发规则为2时并且匹配规则为1时的判定模型
	Keywords          []string `bson:"keywords,omitempty"       json:"keywords,omitempty"`            // 转发规则为2时的关键字
	TargetModels      []string `bson:"target_models,omitempty"  json:"target_models,omitempty"`       // 转发规则为2时的目标模型
	ContentLength     int      `bson:"content_length,omitempty" json:"content_length,omitempty"`      // 转发规则为3时的内容长度
	TargetModelName   string   `bson:"-"                        json:"target_model_name,omitempty"`   // 转发规则为1和3时的目标模型名称
	DecisionModelName string   `bson:"-"                        json:"decision_model_name,omitempty"` // 转发规则为2时并且匹配规则为1时的判定模型名称
	TargetModelNames  []string `bson:"-"                        json:"target_model_names,omitempty"`  // 转发规则为2时的目标模型名称
}

type ImageData

type ImageData struct {
	URL           string `bson:"url,omitempty"`
	B64JSON       string `bson:"b64_json,omitempty"`
	RevisedPrompt string `bson:"revised_prompt,omitempty"`
}

type ImageQuota

type ImageQuota struct {
	Width      int    `bson:"width,omitempty"      json:"width,omitempty"`      // 宽度
	Height     int    `bson:"height,omitempty"     json:"height,omitempty"`     // 高度
	Mode       string `bson:"mode,omitempty"       json:"mode,omitempty"`       // 模式[low, high, auto]
	FixedQuota int    `bson:"fixed_quota"          json:"fixed_quota"`          // 固定额度
	IsDefault  bool   `bson:"is_default,omitempty" json:"is_default,omitempty"` // 是否默认选项
}

type Message

type Message struct {
	Role    string `bson:"role,omitempty"    json:"role,omitempty"`    // 角色
	Content string `bson:"content,omitempty" json:"content,omitempty"` // 内容
}

type MidjourneyQuota

type MidjourneyQuota struct {
	Name       string `bson:"name,omitempty"        json:"name,omitempty"`   // 名称
	Action     string `bson:"action,omitempty"      json:"action,omitempty"` // 动作[IMAGINE, UPSCALE, VARIATION, ZOOM, PAN, DESCRIBE, BLEND, SHORTEN, SWAP_FACE]
	Path       string `bson:"path,omitempty"        json:"path,omitempty"`   // 路径
	FixedQuota int    `bson:"fixed_quota"           json:"fixed_quota"`      // 固定额度
}

type ModelStat added in v0.5.0

type ModelStat struct {
	ModelId        string `bson:"model_id,omitempty"        json:"model_id,omitempty"`        // 模型ID
	Model          string `bson:"model,omitempty"           json:"model,omitempty"`           // 模型
	Total          int    `bson:"total,omitempty"           json:"total,omitempty"`           // 总数
	Tokens         int    `bson:"tokens,omitempty"          json:"tokens,omitempty"`          // 令牌数
	Abnormal       int    `bson:"abnormal,omitempty"        json:"abnormal,omitempty"`        // 异常数
	AbnormalTokens int    `bson:"abnormal_tokens,omitempty" json:"abnormal_tokens,omitempty"` // 异常令牌数
}

type MultimodalAudioQuota added in v0.5.0

type MultimodalAudioQuota struct {
	TextQuota  TextQuota  `bson:"text_quota,omitempty"  json:"text_quota,omitempty"`  // 文本额度
	AudioQuota AudioQuota `bson:"audio_quota,omitempty" json:"audio_quota,omitempty"` // 音频额度
	FixedQuota int        `bson:"fixed_quota"           json:"fixed_quota"`           // 固定额度
}

type MultimodalQuota

type MultimodalQuota struct {
	TextQuota   TextQuota    `bson:"text_quota,omitempty"   json:"text_quota,omitempty"`   // 文本额度
	ImageQuotas []ImageQuota `bson:"image_quotas,omitempty" json:"image_quotas,omitempty"` // 图像额度
	FixedQuota  int          `bson:"fixed_quota"            json:"fixed_quota"`            // 固定额度
}

type PresetConfig

type PresetConfig struct {
	IsSupportSystemRole bool   `bson:"is_support_system_role" json:"is_support_system_role,omitempty"` // 是否支持system角色
	SystemRolePrompt    string `bson:"system_role_prompt"     json:"system_role_prompt,omitempty"`     // system角色预设提示词
	MinTokens           int    `bson:"min_tokens"             json:"min_tokens,omitempty"`             // max_tokens取值的最小值
	MaxTokens           int    `bson:"max_tokens"             json:"max_tokens,omitempty"`             // max_tokens取值的最大值
}

type RealtimeQuota added in v0.5.0

type RealtimeQuota struct {
	TextQuota  TextQuota  `bson:"text_quota,omitempty"  json:"text_quota,omitempty"`  // 文本额度
	AudioQuota AudioQuota `bson:"audio_quota,omitempty" json:"audio_quota,omitempty"` // 音频额度
	FixedQuota int        `bson:"fixed_quota"           json:"fixed_quota"`           // 固定额度
}

type Retry

type Retry struct {
	IsRetry    bool   `bson:"is_retry,omitempty"    json:"is_retry,omitempty"`    // 是否重试
	RetryCount int    `bson:"retry_count,omitempty" json:"retry_count,omitempty"` // 重试次数
	ErrMsg     string `bson:"err_msg,omitempty"     json:"err_msg,omitempty"`     // 错误信息
}

type TextQuota

type TextQuota struct {
	BillingMethod   int     `bson:"billing_method,omitempty"   json:"billing_method,omitempty"`         // 计费方式[1:倍率, 2:固定额度]
	PromptRatio     float64 `bson:"prompt_ratio,omitempty"     json:"prompt_ratio,omitempty"     d:"1"` // 提示倍率(提问倍率)
	CompletionRatio float64 `bson:"completion_ratio,omitempty" json:"completion_ratio,omitempty" d:"1"` // 补全倍率(回答倍率)
	FixedQuota      int     `bson:"fixed_quota"                json:"fixed_quota"`                      // 固定额度
}

Jump to

Keyboard shortcuts

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