添加spark部分支持

This commit is contained in:
junleea 2025-03-24 13:36:42 +08:00
parent 4688e1a916
commit e2f1b39803
2 changed files with 6 additions and 1 deletions

View File

@ -21,6 +21,7 @@ type ModelParam struct {
type WSMessageReq struct {
Type string `json:"type"` //接收及发送消息类型
Function string `json:"function"` //功能名称
Msg string `json:"msg"` //消息内容,只进行转发,不做处理
SessionID int `json:"session_id"` //应用层会话id
ToID int `json:"to_id"` //接收者id

View File

@ -86,6 +86,7 @@ func WSReceiveMessageService(userID, sessionID int, channel string, msg proto.WS
if msg.Type == "ollama" {
resErr, resID = ReceiveOllamaSession(userID, sessionID, channel, msg)
} else if msg.Type == "spark" {
resErr, resID = ReceiveSparkSession(userID, sessionID, channel, msg)
}
return resErr, resID
@ -150,6 +151,9 @@ func ReceiveOllamaSession(userID, sessionID int, channel string, msg proto.WSMes
}
func ReceiveSparkSession(userID, sessionID int, channel string, msg proto.WSMessageReq) (error, uint) {
var resErr error
var resID uint
//查找模型
return nil, 0
return resErr, resID
}