mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-10-19 10:07:29 +00:00
feat: support minimax's models now (close #354)
This commit is contained in:
14
relay/channel/minimax/main.go
Normal file
14
relay/channel/minimax/main.go
Normal file
@@ -0,0 +1,14 @@
|
||||
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)
|
||||
}
|
Reference in New Issue
Block a user