@@ -27,8 +27,8 @@ type DocumentChatRequest struct {
PromptName string `json:"prompt_name"`
}
type HistoryContent struct {
- Content string `json:"content"`
- Role string `json:"role"`
+ Content string `json:"Content"`
+ Role string `json:"Role"`
type KbSearchDocsRequest struct {
@@ -78,7 +78,6 @@ func (manager *ConnectionManager) HandleMessage(userID int, sessionID string, me
if resp == nil {
return errors.New("知识库问答失败: 无应答")
-
if err != nil {
err = errors.New(fmt.Sprintf("知识库问答失败: httpCode:%d,错误信息:%s", resp.StatusCode, http.StatusText(resp.StatusCode)))
return err