添加腾讯混元大模型支持
This commit is contained in:
parent
853cd35dcc
commit
de7ed81607
|
|
@ -146,6 +146,7 @@ const (
|
||||||
ModelTypeOllama = "ollama"
|
ModelTypeOllama = "ollama"
|
||||||
ModelTypeQianfan = "qianfan"
|
ModelTypeQianfan = "qianfan"
|
||||||
ModelTypeTongyi = "tongyi"
|
ModelTypeTongyi = "tongyi"
|
||||||
|
ModelTypeHuanyun = "huanyun"
|
||||||
KnowledgeBaseServerResponseType = "kbase_query_resp"
|
KnowledgeBaseServerResponseType = "kbase_query_resp"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ package service
|
||||||
import (
|
import (
|
||||||
"StuAcaWorksAI/dao"
|
"StuAcaWorksAI/dao"
|
||||||
"StuAcaWorksAI/proto"
|
"StuAcaWorksAI/proto"
|
||||||
|
"StuAcaWorksAI/service/generalModel"
|
||||||
"StuAcaWorksAI/worker"
|
"StuAcaWorksAI/worker"
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
@ -138,6 +139,8 @@ func WSReceiveMessageServiceV2(modelParam proto.ModelParam, ctx *proto.IMParamCo
|
||||||
Qianfan(modelParam, ctx)
|
Qianfan(modelParam, ctx)
|
||||||
case proto.ModelTypeTongyi:
|
case proto.ModelTypeTongyi:
|
||||||
Tongyi(modelParam, ctx)
|
Tongyi(modelParam, ctx)
|
||||||
|
case proto.ModelTypeHuanyun:
|
||||||
|
generalModel.OpenAI(modelParam, ctx, ctx.ModelType)
|
||||||
default:
|
default:
|
||||||
resErr, resID = errors.New("model type not exist:"+ctx.ModelType), 0
|
resErr, resID = errors.New("model type not exist:"+ctx.ModelType), 0
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue