Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterAuth ¶
func RegisterAuth(i IAuth)
func RegisterChat ¶
func RegisterChat(i IChat)
func RegisterCommon ¶
func RegisterCommon(i ICommon)
func RegisterUser ¶
func RegisterUser(i IUser)
func RegisterVip ¶
func RegisterVip(i IVip)
Types ¶
type IAuth ¶
type IChat ¶
type IChat interface { Completions(ctx context.Context, params model.CompletionsReq) (response openai.ChatCompletionResponse, err error) CompletionsStream(ctx context.Context, params model.CompletionsReq) (err error) }
type ICommon ¶
type ICommon interface { VerifyToken(ctx context.Context, secretKey string) bool GetUidUsageKey(ctx context.Context) string RecordUsage(ctx context.Context, totalTokens int) error GetUsageCount(ctx context.Context) (int, error) GetUsedTokens(ctx context.Context) (int, error) GetTotalTokens(ctx context.Context) (int, error) }
Click to show internal directories.
Click to hide internal directories.