ExaSearchTool

org.llm4s.toolapi.builtin.search.ExaSearchTool
object ExaSearchTool

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def create(toolConfig: ExaSearchToolConfig, config: Option[ExaSearchConfig], httpClient: Llm4sHttpClient, restoreInterrupt: () => Unit): Result[ToolFunction[Map[String, Any], ExaSearchResult]]

Create an Exa search tool with explicit configuration.

Create an Exa search tool with explicit configuration.

Security: This tool makes external HTTPS calls to the Exa API. Ensure proper API key management and network access controls.

Value parameters

config

Optional configuration overrides (will be validated)

httpClient

HTTP client for making requests (injectable for testing)

restoreInterrupt

Function to restore interrupt flag (injectable for testing)

toolConfig

The Exa API configuration (must use HTTPS)

Attributes

Returns

Right(ToolFunction) if valid, Left(ValidationError) otherwise

def withApiKey(apiKey: String, apiUrl: String, config: Option[ExaSearchConfig], httpClient: Llm4sHttpClient, restoreInterrupt: () => Unit): Result[ToolFunction[Map[String, Any], ExaSearchResult]]

Create an Exa search tool with explicit API key and defaults.

Create an Exa search tool with explicit API key and defaults.

Security: This tool makes external HTTPS calls to the Exa API. The provided API URL must use HTTPS protocol.

Value parameters

apiKey

The Exa API key (must not be empty)

apiUrl

The Exa API URL (must use HTTPS, default: https://api.exa.ai)

config

Optional request configuration

httpClient

HTTP client for making requests (injectable for testing)

restoreInterrupt

Function to restore interrupt flag (injectable for testing)

Attributes

Returns

Right(ToolFunction) if valid, Left(ValidationError) otherwise