Local LLM models: Part 5 - adding a web browser tool
In this final post of the series we’ll add tool functions which will allow the model to retrieve new information by performing web searches and parsing the results. We’ll use a similar interface to the one used by OpenAI in the training of the gpt-oss models. See the OpenAI github for their sample implementation in Python.
So we need to add 3 tool functions which will implement the same ToolFunction
interface we defined in
part 3.
- browser.search - Performs a web search and returns a list of links with title and description for each.
- browser.open - Opens a URL and returns an extract from the page content in Markdown format.
- browser.find - Searches for a literal string within an opened page.
The code described below is a reimplentation in go, using the Brave search API for web search and a local Firecrawl instance to scape web pages and convert the content to Markdown.