controller

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2025 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetImageSizePrice

func GetImageSizePrice(modelConfig *model.ModelConfig, size string) (float64, bool)

func GetModelPrice

func GetModelPrice(modelConfig *model.ModelConfig) (float64, float64, bool)

Types

type HandleResult

type HandleResult struct {
	Error       *relaymodel.ErrorWithStatusCode
	Usage       *relaymodel.Usage
	InputPrice  float64
	OutputPrice float64
	Detail      *model.RequestDetail
}

HandleResult contains all the information needed for consumption recording

func Handle

func Handle(meta *meta.Meta, c *gin.Context, preProcess func() (*PreCheckGroupBalanceReq, error)) *HandleResult

func RelayImageHelper

func RelayImageHelper(meta *meta.Meta, c *gin.Context) *HandleResult

func RelayParsePdfHelper

func RelayParsePdfHelper(meta *meta.Meta, c *gin.Context) *HandleResult

func RelaySTTHelper

func RelaySTTHelper(meta *meta.Meta, c *gin.Context) *HandleResult

func RelayTTSHelper

func RelayTTSHelper(meta *meta.Meta, c *gin.Context) *HandleResult

func RelayTextHelper

func RelayTextHelper(meta *meta.Meta, c *gin.Context) *HandleResult

func RerankHelper

func RerankHelper(meta *meta.Meta, c *gin.Context) *HandleResult

type PreCheckGroupBalanceReq

type PreCheckGroupBalanceReq struct {
	InputTokens int
	MaxTokens   int
	InputPrice  float64
	OutputPrice float64
}

Jump to

Keyboard shortcuts

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