mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-09-30 15:16:39 +08:00
19 lines
344 B
Go
19 lines
344 B
Go
package aiproxy
|
|
|
|
import (
|
|
"one-api/providers/openai"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
type AIProxyProvider struct {
|
|
*openai.OpenAIProvider
|
|
}
|
|
|
|
// 创建 CreateAIProxyProvider
|
|
func CreateAIProxyProvider(c *gin.Context) *AIProxyProvider {
|
|
return &AIProxyProvider{
|
|
OpenAIProvider: openai.CreateOpenAIProvider(c, "https://api.aiproxy.io"),
|
|
}
|
|
}
|