结构修改
This commit is contained in:
parent
ed7591975b
commit
935712308e
|
@ -5,7 +5,7 @@ server:
|
||||||
|
|
||||||
ollama:
|
ollama:
|
||||||
base_url: "http://localhost:11434"
|
base_url: "http://localhost:11434"
|
||||||
model: "qwen3:8b"
|
model: "qwen3-coder:480b-cloud"
|
||||||
timeout: "120s"
|
timeout: "120s"
|
||||||
level: "info"
|
level: "info"
|
||||||
format: "json"
|
format: "json"
|
||||||
|
|
|
@ -71,15 +71,15 @@ func (r *AiRouterBiz) Route(ctx context.Context, req *entitys.ChatRequest) (*ent
|
||||||
// Route 执行智能路由
|
// Route 执行智能路由
|
||||||
func (r *AiRouterBiz) RouteWithSocket(c *websocket.Conn, req *entitys.ChatSockRequest) error {
|
func (r *AiRouterBiz) RouteWithSocket(c *websocket.Conn, req *entitys.ChatSockRequest) error {
|
||||||
|
|
||||||
session := c.Headers("X-Session", "")
|
session := c.Query("x-session", "")
|
||||||
if len(session) == 0 {
|
if len(session) == 0 {
|
||||||
return errors.SessionNotFound
|
return errors.SessionNotFound
|
||||||
}
|
}
|
||||||
auth := c.Headers("X-Authorization", "")
|
auth := c.Query("x-authorization", "")
|
||||||
if len(auth) == 0 {
|
if len(auth) == 0 {
|
||||||
return errors.AuthNotFound
|
return errors.AuthNotFound
|
||||||
}
|
}
|
||||||
key := c.Headers("X-App-Key", "")
|
key := c.Query("x-app-key", "")
|
||||||
if len(key) == 0 {
|
if len(key) == 0 {
|
||||||
return errors.KeyNotFound
|
return errors.KeyNotFound
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue