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