From d098aadf99823dc94111856a9e14ea0bd51a1e7b Mon Sep 17 00:00:00 2001 From: Grail Finder Date: Mon, 20 Oct 2025 11:44:44 +0300 Subject: Feat: add websearch to function map --- tools.go | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'tools.go') diff --git a/tools.go b/tools.go index 9ee0db9..0528af9 100644 --- a/tools.go +++ b/tools.go @@ -231,10 +231,33 @@ var fnMap = map[string]fnSig{ "recall": recall, "recall_topics": recallTopics, "memorise": memorise, + "websearch": websearch, } // openai style def var baseTools = []models.Tool{ + // websearch + models.Tool{ + Type: "function", + Function: models.ToolFunc{ + Name: "websearch", + Description: "Search web given query, limit of sources (default 3).", + Parameters: models.ToolFuncParams{ + Type: "object", + Required: []string{"query", "limit"}, + Properties: map[string]models.ToolArgProps{ + "query": models.ToolArgProps{ + Type: "string", + Description: "search query", + }, + "limit": models.ToolArgProps{ + Type: "string", + Description: "limit of the website results", + }, + }, + }, + }, + }, // memorise models.Tool{ Type: "function", -- cgit v1.2.3