mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-09-24 20:26:41 +08:00
feat: Enhance VolcEngine channel support with bot model routing
This commit is contained in:
parent
1ac79a8126
commit
e71893df6e
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user