feat(canvas): 前端重构与渠道兼容 - 重构工作区、任务中心等多页面,修复智能体对话与节点生成
Co-authored-by: sikongyue <3155157671@qq.com> Original-PR: https://github.com/ddcat-ai/open-ai-canvas/pull/217
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"mime"
|
||||
"net/http"
|
||||
@@ -170,7 +171,11 @@ func writeCustomRelayError(c *gin.Context, resp *http.Response, apiKey string, m
|
||||
c.Data(resp.StatusCode, "application/json; charset=utf-8", body)
|
||||
return
|
||||
}
|
||||
fail(c, resp.StatusCode, errors.New("自定义渠道上游请求失败"))
|
||||
snippet := strings.TrimSpace(string(body))
|
||||
if len(snippet) > 200 {
|
||||
snippet = snippet[:200] + "..."
|
||||
}
|
||||
fail(c, resp.StatusCode, fmt.Errorf("自定义渠道上游请求失败(%s)%s", resp.Status, snippet))
|
||||
}
|
||||
|
||||
func copyCustomRelayStream(c *gin.Context, source io.Reader, apiKey string, maxBytes int64) {
|
||||
|
||||
Reference in New Issue
Block a user