结构修改
This commit is contained in:
parent
348756eebf
commit
cd48fb0fbd
|
@ -87,6 +87,9 @@ func (r *OllamaService) getPrompt(ctx context.Context, requireData *entitys.Requ
|
|||
}
|
||||
|
||||
func (r *OllamaService) RecognizeWithImg(ctx context.Context, requireData *entitys.RequireData) (desc api.GenerateResponse, err error) {
|
||||
if requireData.ImgByte == nil {
|
||||
return
|
||||
}
|
||||
requireData.Ch <- entitys.Response{
|
||||
Index: "",
|
||||
Content: "图片识别中。。。",
|
||||
|
@ -97,6 +100,7 @@ func (r *OllamaService) RecognizeWithImg(ctx context.Context, requireData *entit
|
|||
Stream: new(bool),
|
||||
System: "识别图片内容",
|
||||
Prompt: requireData.UserInput,
|
||||
Images: requireData.ImgByte,
|
||||
})
|
||||
return
|
||||
}
|
||||
|
|
|
@ -114,7 +114,7 @@ func (w *ZltxOrderDetailTool) getZltxOrderDetail(requireData *entitys.RequireDat
|
|||
return
|
||||
}
|
||||
if codeMap["code"].(float64) != 200 {
|
||||
return fmt.Errorf("订单查询失败:状态码错误:%s", codeMap["error"])
|
||||
return fmt.Errorf("订单查询失败:状态码错误:%s", string(res.Content))
|
||||
}
|
||||
|
||||
var resData ZltxOrderDetailResponse
|
||||
|
|
|
@ -3,7 +3,6 @@ package tools
|
|||
import (
|
||||
"ai_scheduler/internal/config"
|
||||
"ai_scheduler/internal/entitys"
|
||||
"ai_scheduler/internal/pkg"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
@ -168,7 +167,7 @@ func (z ZltxProductTool) getZltxProduct(body *ZltxProductRequest, requireData *e
|
|||
return fmt.Errorf("解析商品数据失败:%w", err)
|
||||
}
|
||||
if resp.Code != 200 {
|
||||
return fmt.Errorf("商品查询失败:%s", pkg.JsonStringIgonErr(resp))
|
||||
return fmt.Errorf("商品查询失败:%s", string(res.Content))
|
||||
}
|
||||
if resp.Data.List == nil || len(resp.Data.List) == 0 {
|
||||
var respData ZltxProductDataById
|
||||
|
|
|
@ -3,7 +3,6 @@ package tools
|
|||
import (
|
||||
"ai_scheduler/internal/config"
|
||||
"ai_scheduler/internal/entitys"
|
||||
"ai_scheduler/internal/pkg"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
@ -96,7 +95,7 @@ func (z ZltxOrderStatisticsTool) getZltxOrderStatistics(number string, requireDa
|
|||
return err
|
||||
}
|
||||
if resData.Code != 200 {
|
||||
return fmt.Errorf("为获取到数据,请检查权限: %s", pkg.JsonStringIgonErr(resData))
|
||||
return fmt.Errorf("为获取到数据,请检查权限: %s", string(res.Content))
|
||||
}
|
||||
//按照日期排序
|
||||
sort.Slice(resData.Data.RecentThreeDays, func(i, j int) bool {
|
||||
|
|
Loading…
Reference in New Issue