diff --git a/internal/biz/router_test.go b/internal/biz/router_test.go index 4a98dc1..f0647f8 100644 --- a/internal/biz/router_test.go +++ b/internal/biz/router_test.go @@ -57,7 +57,7 @@ func Test_ProductLog(t *testing.T) { routerBiz := in() ch := make(chan entitys.ResponseData, 5) defer close(ch) - err := routerBiz.handleTask(ch, nil, &entitys.Match{Index: "order_diagnosis", Parameters: `{"name":"优酷周卡","serial_number":"822979421979938817"}`}, &model.AiTask{Config: `{"tool": "zltxProduct", "param": {"type": "object", "optional": [], "required": ["order_number"], "properties": {"order_number": {"type": "string", "description": "订单编号/流水号"}}}}`}) + err := routerBiz.handleTask(ch, nil, &entitys.Match{Index: "order_diagnosis", Parameters: `{"id":"101","serial_number":"822979421979938817"}`}, &model.AiTask{Config: `{"tool": "zltxProduct", "param": {"type": "object", "optional": [], "required": ["order_number"], "properties": {"order_number": {"type": "string", "description": "订单编号/流水号"}}}}`}) t.Log(err) } diff --git a/internal/tools/zltx_product.go b/internal/tools/zltx_product.go index a6002b3..0bd3d80 100644 --- a/internal/tools/zltx_product.go +++ b/internal/tools/zltx_product.go @@ -143,7 +143,7 @@ func (z ZltxProductTool) getZltxProduct(channel chan entitys.ResponseData, c *we var Url string var params map[string]string if id != "" { - Url = fmt.Sprintf("%s%s", z.config.BaseURL, id) + Url = fmt.Sprintf("%s/%s", z.config.BaseURL, id) } else { Url = fmt.Sprintf("%s?keyword=%s&limit=10&page=1", z.config.BaseURL, name) params = map[string]string{