mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-11-14 20:23:46 +08:00
🎨 添加工厂方法
This commit is contained in:
@@ -16,6 +16,13 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
type OpenAIProviderFactory struct{}
|
||||
|
||||
// 创建 OpenAIProvider
|
||||
func (f OpenAIProviderFactory) Create(c *gin.Context) base.ProviderInterface {
|
||||
return CreateOpenAIProvider(c, "")
|
||||
}
|
||||
|
||||
type OpenAIProvider struct {
|
||||
base.BaseProvider
|
||||
IsAzure bool
|
||||
|
||||
Reference in New Issue
Block a user