feat: 前端搭建-未完成

This commit is contained in:
tbphp
2025-06-29 21:59:32 +08:00
parent ab95af0bbe
commit 731315144e
62 changed files with 4831 additions and 604 deletions

View File

@@ -0,0 +1,18 @@
package channel
import (
"fmt"
"gpt-load/internal/models"
)
// GetChannel returns a channel proxy based on the group's channel type.
func GetChannel(group *models.Group) (ChannelProxy, error) {
switch group.ChannelType {
case "openai":
return NewOpenAIChannel(group)
case "gemini":
return NewGeminiChannel(group)
default:
return nil, fmt.Errorf("unsupported channel type: %s", group.ChannelType)
}
}