添加spark部分支持
This commit is contained in:
parent
4688e1a916
commit
e2f1b39803
|
|
@ -21,6 +21,7 @@ type ModelParam struct {
|
||||||
|
|
||||||
type WSMessageReq struct {
|
type WSMessageReq struct {
|
||||||
Type string `json:"type"` //接收及发送消息类型
|
Type string `json:"type"` //接收及发送消息类型
|
||||||
|
Function string `json:"function"` //功能名称
|
||||||
Msg string `json:"msg"` //消息内容,只进行转发,不做处理
|
Msg string `json:"msg"` //消息内容,只进行转发,不做处理
|
||||||
SessionID int `json:"session_id"` //应用层会话id
|
SessionID int `json:"session_id"` //应用层会话id
|
||||||
ToID int `json:"to_id"` //接收者id
|
ToID int `json:"to_id"` //接收者id
|
||||||
|
|
|
||||||
|
|
@ -86,6 +86,7 @@ func WSReceiveMessageService(userID, sessionID int, channel string, msg proto.WS
|
||||||
if msg.Type == "ollama" {
|
if msg.Type == "ollama" {
|
||||||
resErr, resID = ReceiveOllamaSession(userID, sessionID, channel, msg)
|
resErr, resID = ReceiveOllamaSession(userID, sessionID, channel, msg)
|
||||||
} else if msg.Type == "spark" {
|
} else if msg.Type == "spark" {
|
||||||
|
resErr, resID = ReceiveSparkSession(userID, sessionID, channel, msg)
|
||||||
|
|
||||||
}
|
}
|
||||||
return resErr, resID
|
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) {
|
func ReceiveSparkSession(userID, sessionID int, channel string, msg proto.WSMessageReq) (error, uint) {
|
||||||
|
var resErr error
|
||||||
|
var resID uint
|
||||||
|
//查找模型
|
||||||
|
|
||||||
return nil, 0
|
return resErr, resID
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue