mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-23 00:46:42 +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:
@@ -97,10 +97,10 @@ func ConvertFloatsToPyFormat(v interface{}) interface{} {
|
||||
// the O(n * eps) of a naive left-to-right loop.
|
||||
//
|
||||
// This implementation matches numpy's exact pairwise summation algorithm:
|
||||
// - For n < 16: uses naive left-to-right sum (matching numpy's small-array optimization)
|
||||
// - For n >= 16: processes pairs left-to-right, carrying any odd element to the end
|
||||
// of the next level. This matches numpy's pairwise reduction in
|
||||
// numpy/core/src/umath/reduction.c.
|
||||
// - For n < 16: uses naive left-to-right sum (matching numpy's small-array optimization)
|
||||
// - For n >= 16: processes pairs left-to-right, carrying any odd element to the end
|
||||
// of the next level. This matches numpy's pairwise reduction in
|
||||
// numpy/core/src/umath/reduction.c.
|
||||
//
|
||||
// xs is modified in place. Pass a copy if the caller still needs the input.
|
||||
//
|
||||
|
||||
@@ -27,14 +27,17 @@ import (
|
||||
// - ISO 8601 / RFC3339 (e.g., "2026-04-09T18:55:46+08:00")
|
||||
//
|
||||
// Args:
|
||||
// dateString: Date string in supported format
|
||||
//
|
||||
// dateString: Date string in supported format
|
||||
//
|
||||
// Returns:
|
||||
// float64: Number of seconds between the given date and current time
|
||||
//
|
||||
// float64: Number of seconds between the given date and current time
|
||||
//
|
||||
// Example:
|
||||
// DeltaSeconds("2024-01-01 12:00:00")
|
||||
// DeltaSeconds("2026-04-09T18:55:46+08:00")
|
||||
//
|
||||
// DeltaSeconds("2024-01-01 12:00:00")
|
||||
// DeltaSeconds("2026-04-09T18:55:46+08:00")
|
||||
func DeltaSeconds(dateString string) (float64, error) {
|
||||
// Try RFC3339 format first (ISO 8601 with timezone, e.g., "2026-04-09T18:55:46+08:00")
|
||||
dt, err := time.Parse(time.RFC3339, dateString)
|
||||
|
||||
Reference in New Issue
Block a user