mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-11-18 14:13:43 +08:00
✨ 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:
@@ -25,6 +25,7 @@ type ProviderConfig struct {
|
||||
ImagesGenerations string
|
||||
ImagesEdit string
|
||||
ImagesVariations string
|
||||
ModelList string
|
||||
}
|
||||
|
||||
type BaseProvider struct {
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user