mirror of
https://github.com/songquanpeng/one-api.git
synced 2026-04-25 19:24:26 +08:00
feat: add PPIO as model provider
This commit is contained in:
@@ -3,6 +3,7 @@ package openai
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/songquanpeng/one-api/relay/adaptor/ppio"
|
||||
"io"
|
||||
"net/http"
|
||||
"strings"
|
||||
@@ -59,6 +60,8 @@ func (a *Adaptor) GetRequestURL(meta *meta.Meta) (string, error) {
|
||||
return baiduv2.GetRequestURL(meta)
|
||||
case channeltype.AliBailian:
|
||||
return alibailian.GetRequestURL(meta)
|
||||
case channeltype.PPIO:
|
||||
return ppio.GetRequestURL(meta)
|
||||
default:
|
||||
return GetFullRequestURL(meta.BaseURL, meta.RequestURLPath, meta.ChannelType), nil
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ import (
|
||||
"github.com/songquanpeng/one-api/relay/adaptor/moonshot"
|
||||
"github.com/songquanpeng/one-api/relay/adaptor/novita"
|
||||
"github.com/songquanpeng/one-api/relay/adaptor/openrouter"
|
||||
"github.com/songquanpeng/one-api/relay/adaptor/ppio"
|
||||
"github.com/songquanpeng/one-api/relay/adaptor/siliconflow"
|
||||
"github.com/songquanpeng/one-api/relay/adaptor/stepfun"
|
||||
"github.com/songquanpeng/one-api/relay/adaptor/togetherai"
|
||||
@@ -40,6 +41,7 @@ var CompatibleChannels = []int{
|
||||
channeltype.XAI,
|
||||
channeltype.BaiduV2,
|
||||
channeltype.XunfeiV2,
|
||||
channeltype.PPIO,
|
||||
}
|
||||
|
||||
func GetCompatibleChannelMeta(channelType int) (string, []string) {
|
||||
@@ -82,6 +84,8 @@ func GetCompatibleChannelMeta(channelType int) (string, []string) {
|
||||
return "openrouter", openrouter.ModelList
|
||||
case channeltype.AliBailian:
|
||||
return "alibailian", alibailian.ModelList
|
||||
case channeltype.PPIO:
|
||||
return "ppio", ppio.ModelList
|
||||
default:
|
||||
return "openai", ModelList
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user