添加千帆大模型支持
This commit is contained in:
parent
6ee679f29e
commit
2e02bd22a1
|
|
@ -16,12 +16,12 @@ import (
|
|||
func Qianfan(modelParam proto.ModelParam, imCtx *proto.IMParamContext) {
|
||||
log.Println("qianfan model param:", modelParam)
|
||||
log.Println("qianfan question:", imCtx.Question)
|
||||
if modelParam.AccessKey == "" || modelParam.APISecret == "" {
|
||||
log.Println("qianfan AccessKey or APISecret is empty")
|
||||
if modelParam.AccessKey == "" || modelParam.SecretKey == "" {
|
||||
log.Println("qianfan AccessKey or SecretKey is empty")
|
||||
return
|
||||
}
|
||||
qianfan.GetConfig().AccessKey = modelParam.AccessKey
|
||||
qianfan.GetConfig().SecretKey = modelParam.APISecret
|
||||
qianfan.GetConfig().SecretKey = modelParam.SecretKey
|
||||
|
||||
chat := qianfan.NewChatCompletion(qianfan.WithModel(modelParam.Model))
|
||||
var messages []qianfan.ChatCompletionMessage
|
||||
|
|
|
|||
Loading…
Reference in New Issue