mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-09-29 14:46:38 +08:00
20 lines
396 B
Go
20 lines
396 B
Go
package aiproxy
|
|
|
|
import (
|
|
"one-api/model"
|
|
"one-api/providers/base"
|
|
"one-api/providers/openai"
|
|
)
|
|
|
|
type AIProxyProviderFactory struct{}
|
|
|
|
type AIProxyProvider struct {
|
|
*openai.OpenAIProvider
|
|
}
|
|
|
|
func (f AIProxyProviderFactory) Create(channel *model.Channel) base.ProviderInterface {
|
|
return &AIProxyProvider{
|
|
OpenAIProvider: openai.CreateOpenAIProvider(channel, "https://api.aiproxy.io"),
|
|
}
|
|
}
|