mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-11-10 02:23:43 +08:00
feat: add support for bytedance's doubao (#1438)
* 增加豆包大模型支持 * chore: update channel options & add prompt --------- Co-authored-by: 康龙彪 <longbiao.kang@i-tudou.com> Co-authored-by: JustSong <songquanpeng@foxmail.com>
This commit is contained in:
14
relay/adaptor/doubao/main.go
Normal file
14
relay/adaptor/doubao/main.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package doubao
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/songquanpeng/one-api/relay/meta"
|
||||
"github.com/songquanpeng/one-api/relay/relaymode"
|
||||
)
|
||||
|
||||
func GetRequestURL(meta *meta.Meta) (string, error) {
|
||||
if meta.Mode == relaymode.ChatCompletions {
|
||||
return fmt.Sprintf("%s/api/v3/chat/completions", meta.BaseURL), nil
|
||||
}
|
||||
return "", fmt.Errorf("unsupported relay mode %d for doubao", meta.Mode)
|
||||
}
|
||||
Reference in New Issue
Block a user