feat: 配置优化

This commit is contained in:
tbphp
2025-07-03 17:53:56 +08:00
parent 80662af9de
commit 0bd6a9289c
6 changed files with 77 additions and 82 deletions

View File

@@ -5,14 +5,15 @@ import (
"net/http"
"github.com/gin-gonic/gin"
"gorm.io/datatypes"
)
type OpenAIChannel struct {
BaseChannel
}
func NewOpenAIChannel(upstreams []string) (*OpenAIChannel, error) {
base, err := newBaseChannelWithUpstreams("openai", upstreams)
func NewOpenAIChannel(upstreams []string, config datatypes.JSONMap) (*OpenAIChannel, error) {
base, err := newBaseChannelWithUpstreams("openai", upstreams, config)
if err != nil {
return nil, err
}