feat: Add support for retrieving model list from providers (#188)

*  feat: Add support for retrieving model list from providers

* 🔖 chore: Custom channel automatically get the model
This commit is contained in:
Buer
2024-05-16 15:21:13 +08:00
committed by GitHub
parent ef63fbfd31
commit 7263582b9b
20 changed files with 444 additions and 31 deletions

View File

@@ -25,6 +25,7 @@ type ProviderConfig struct {
ImagesGenerations string
ImagesEdit string
ImagesVariations string
ModelList string
}
type BaseProvider struct {

View File

@@ -99,6 +99,16 @@ type ImageVariationsInterface interface {
CreateImageVariations(request *types.ImageEditRequest) (*types.ImageResponse, *types.OpenAIErrorWithStatusCode)
}
// type RelayInterface interface {
// ProviderInterface
// CreateRelay() (*http.Response, *types.OpenAIErrorWithStatusCode)
// }
type ModelListInterface interface {
ProviderInterface
GetModelList() ([]string, error)
}
// 余额接口
type BalanceInterface interface {
Balance() (float64, error)