add: add Translation api

This commit is contained in:
Martial BE
2023-12-01 11:38:35 +08:00
parent 17027fb61e
commit 5b70ee3407
4 changed files with 103 additions and 3 deletions

View File

@@ -50,6 +50,11 @@ type TranscriptionsInterface interface {
TranscriptionsAction(request *types.AudioRequest, isModelMapped bool, promptTokens int) (usage *types.Usage, errWithCode *types.OpenAIErrorWithStatusCode)
}
type TranslationInterface interface {
ProviderInterface
TranslationAction(request *types.AudioRequest, isModelMapped bool, promptTokens int) (usage *types.Usage, errWithCode *types.OpenAIErrorWithStatusCode)
}
// 余额接口
type BalanceInterface interface {
BalanceAction(channel *model.Channel) (float64, error)