2024-03-01 17:24:28 +00:00
|
|
|
package minimax
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
2024-04-05 16:44:33 +00:00
|
|
|
"github.com/songquanpeng/one-api/relay/relaymode"
|
2024-03-01 17:24:28 +00:00
|
|
|
"github.com/songquanpeng/one-api/relay/util"
|
|
|
|
)
|
|
|
|
|
|
|
|
func GetRequestURL(meta *util.RelayMeta) (string, error) {
|
2024-04-05 16:44:33 +00:00
|
|
|
if meta.Mode == relaymode.ChatCompletions {
|
2024-03-01 17:24:28 +00:00
|
|
|
return fmt.Sprintf("%s/v1/text/chatcompletion_v2", meta.BaseURL), nil
|
|
|
|
}
|
2024-04-05 16:44:33 +00:00
|
|
|
return "", fmt.Errorf("unsupported relay relaymode %d for minimax", meta.Mode)
|
2024-03-01 17:24:28 +00:00
|
|
|
}
|