BraveSearchTool

org.llm4s.toolapi.builtin.search.BraveSearchTool

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def create[R : ReadWriter](toolConfig: BraveSearchToolConfig, category: BraveSearchCategory[R], config: Option[BraveSearchConfig]): ToolFunction[Map[String, Any], R]

Create a Brave search tool with explicit configuration.

Create a Brave search tool with explicit configuration.

Value parameters

category

The search category (Web, Image, Video, or News)

config

Optional configuration overrides (defaults use values from toolConfig)

toolConfig

The Brave API configuration (apiKey, apiUrl, count, safeSearch)

Attributes

Returns

A configured ToolFunction

def withApiKey[R : ReadWriter](apiKey: String, apiUrl: String, category: BraveSearchCategory[R], config: Option[BraveSearchConfig]): ToolFunction[Map[String, Any], R]

Create a Brave search tool with explicit API key and optional overrides.

Create a Brave search tool with explicit API key and optional overrides.

Uses hardcoded defaults for apiUrl, count, and safeSearch. For full control, use create() with a BraveSearchToolConfig instead.

Value parameters

apiKey

The Brave Search API key to use

apiUrl

The Brave API URL (defaults to production endpoint)

category

The search category (Web, Image, Video, or News)

config

Optional search config overrides (count, safeSearch)

Attributes

Returns

A configured ToolFunction ready to use