mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-21 23:21:04 +08:00
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:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user