15 lines
396 B
Go
15 lines
396 B
Go
package minimax
|
|
|
|
import (
|
|
"fmt"
|
|
"github.com/songquanpeng/one-api/relay/constant"
|
|
"github.com/songquanpeng/one-api/relay/util"
|
|
)
|
|
|
|
func GetRequestURL(meta *util.RelayMeta) (string, error) {
|
|
if meta.Mode == constant.RelayModeChatCompletions {
|
|
return fmt.Sprintf("%s/v1/text/chatcompletion_v2", meta.BaseURL), nil
|
|
}
|
|
return "", fmt.Errorf("unsupported relay mode %d for minimax", meta.Mode)
|
|
}
|