Documentation
¶
Index ¶
- func GetCorpCode(ctx context.Context, corpId string) string
- func GetImageQuota(model *model.Model, size string) (imageQuota mcommon.ImageQuota)
- func GetMidjourneyQuota(model *model.Model, request *ghttp.Request, path string) (mcommon.MidjourneyQuota, error)
- func GetMultimodalTokens(ctx context.Context, model string, multiContent []interface{}, ...) (textTokens, imageTokens int)
- func HandleMessages(messages []sdkm.ChatCompletionMessage) []sdkm.ChatCompletionMessage
- func IsAborted(err error) bool
- func IsMaxRetry(isEnableModelAgent bool, agentTotal, keyTotal, retry int) bool
- func IsNeedRetry(err error) (isRetry bool, isDisabled bool)
- func New() service.ICommon
- func NewClient(ctx context.Context, model *model.Model, key, baseURL, path string) (sdk.Chat, error)
- func NewEmbeddingClient(ctx context.Context, model *model.Model, key, baseURL, path string) (*sdk.EmbeddingClient, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetImageQuota ¶ added in v0.4.0
func GetImageQuota(model *model.Model, size string) (imageQuota mcommon.ImageQuota)
func GetMidjourneyQuota ¶ added in v0.4.0
func GetMultimodalTokens ¶ added in v0.4.0
func HandleMessages ¶ added in v0.4.0
func HandleMessages(messages []sdkm.ChatCompletionMessage) []sdkm.ChatCompletionMessage
func IsMaxRetry ¶ added in v0.3.0
func IsNeedRetry ¶ added in v0.3.0
func NewEmbeddingClient ¶ added in v0.4.0
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.