feat(go-agent): Ported retrieval node, added Keenable web search tool (#16396)

Ported retrieval node, added Keenable web search tool
- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
Zhichang Yu
2026-06-26 22:55:49 +08:00
committed by GitHub
parent 9d18f33296
commit 70546ea406
91 changed files with 5920 additions and 3817 deletions

View File

@@ -210,8 +210,8 @@ func (c *Client) doPost(ctx context.Context, url string, buildBody bodyBuilder,
// httpError carries the HTTP status + body so callers can inspect.
// retryable=true means the doPost loop already exhausted retries.
type httpError struct {
Status string
Body string
Status string
Body string
retryable bool
}

View File

@@ -50,16 +50,16 @@ type DLAResult struct {
// at indices 4/6/7/9 are kept verbatim for backward compatibility
// with existing inference servers.
var DLAClasses = []string{
"title", // 0
"text", // 1
"reference", // 2
"figure", // 3
"figure caption", // 4
"table", // 5
"table caption", // 6
"table caption", // 7 duplicate
"equation", // 8
"figure caption", // 9 duplicate
"title", // 0
"text", // 1
"reference", // 2
"figure", // 3
"figure caption", // 4
"table", // 5
"table caption", // 6
"table caption", // 7 duplicate
"equation", // 8
"figure caption", // 9 duplicate
}
// rawDLA is the wire format the DLA server returns

View File

@@ -106,7 +106,7 @@ func TestDLA_SuccessfulResponse(t *testing.T) {
w.Header().Set("Content-Type", "application/json")
_ = json.NewEncoder(w).Encode(map[string]any{
"bboxes": [][]float64{
{10, 20, 100, 200, 0.95, 0}, // title
{10, 20, 100, 200, 0.95, 0}, // title
{10, 220, 500, 400, 0.88, 1}, // text
{50, 420, 600, 700, 0.77, 3}, // figure
},