1
0
mirror of https://github.com/coalaura/whiskr.git synced 2025-12-02 20:22:52 +00:00

incorrect time calculation for search

This commit is contained in:
2025-09-22 03:50:26 +02:00
parent f6987c870c
commit dcd1364f8f
2 changed files with 3 additions and 3 deletions

4
exa.go
View File

@@ -134,7 +134,7 @@ func ExaRunSearch(ctx context.Context, args SearchWebArguments) (*ExaResults, er
case "month":
data["startPublishedDate"] = daysAgo(30)
case "year":
data["startPublishedDate"] = daysAgo(356)
data["startPublishedDate"] = daysAgo(365)
}
req, err := NewExaRequest(ctx, "/search", data)
@@ -168,5 +168,5 @@ func ExaRunContents(ctx context.Context, args FetchContentsArguments) (*ExaResul
}
func daysAgo(days int) string {
return time.Now().Add(time.Duration(days) * 24 * time.Hour).Format(time.DateOnly)
return time.Now().Add(-time.Duration(days) * 24 * time.Hour).Format(time.DateOnly)
}

View File

@@ -46,7 +46,7 @@ func GetSearchTools() []openrouter.Tool {
"type": "integer",
"description": "Number of results to return (3-12). Default is 6.",
"minimum": 3,
"maximum": 10,
"maximum": 12,
},
"intent": map[string]any{
"type": "string",