mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-11-11 10:53:42 +08:00
feat: Enhance VolcEngine channel support with bot model routing
This commit is contained in:
@@ -9,6 +9,9 @@ import (
|
|||||||
func GetRequestURL(meta *meta.Meta) (string, error) {
|
func GetRequestURL(meta *meta.Meta) (string, error) {
|
||||||
switch meta.Mode {
|
switch meta.Mode {
|
||||||
case relaymode.ChatCompletions:
|
case relaymode.ChatCompletions:
|
||||||
|
if strings.HasPrefix(meta.ActualModelName, "bot") {
|
||||||
|
return fmt.Sprintf("%s/api/v3/bots/chat/completions", meta.BaseURL), nil
|
||||||
|
}
|
||||||
return fmt.Sprintf("%s/api/v3/chat/completions", meta.BaseURL), nil
|
return fmt.Sprintf("%s/api/v3/chat/completions", meta.BaseURL), nil
|
||||||
case relaymode.Embeddings:
|
case relaymode.Embeddings:
|
||||||
return fmt.Sprintf("%s/api/v3/embeddings", meta.BaseURL), nil
|
return fmt.Sprintf("%s/api/v3/embeddings", meta.BaseURL), nil
|
||||||
|
|||||||
Reference in New Issue
Block a user