2024-03-01 17:24:28 +00:00
|
|
|
package minimax
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
2024-04-05 17:31:44 +00:00
|
|
|
"github.com/songquanpeng/one-api/relay/meta"
|
2024-04-05 16:44:33 +00:00
|
|
|
"github.com/songquanpeng/one-api/relay/relaymode"
|
2024-03-01 17:24:28 +00:00
|
|
|
)
|
|
|
|
|
2024-04-05 17:31:44 +00:00
|
|
|
func GetRequestURL(meta *meta.Meta) (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 18:12:50 +00:00
|
|
|
return "", fmt.Errorf("unsupported relay mode %d for minimax", meta.Mode)
|
2024-03-01 17:24:28 +00:00
|
|
|
}
|