org.llm4s.toolapi.builtin.search
Search tools for web searches and lookups.
These tools provide web search capabilities using free APIs that don't require API keys.
== Available Tools ==
- WebSearchTool: Search using DuckDuckGo Instant Answer API
- Best for definitions, facts, quick lookups
- No API key required
- Returns abstracts, related topics, and infobox data
Attributes
- Example
-
import org.llm4s.toolapi.builtin.search._ import org.llm4s.toolapi.ToolRegistry // Default search tool val searchTool = WebSearchTool.create() // Custom configuration val customSearch = WebSearchTool.create(WebSearchConfig( timeoutMs = 15000, maxResults = 5 )) val tools = new ToolRegistry(Seq(searchTool))
Members list
Type members
Classlikes
A related topic from web search.
A related topic from web search.
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
RelatedTopic.type
Configuration for web search tool.
Configuration for web search tool.
Value parameters
- maxResults
-
Maximum number of related topics to return.
- safeSearch
-
Whether to enable safe search.
- timeoutMs
-
Request timeout in milliseconds.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Web search result.
Web search result.
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
WebSearchResult.type
Tool for web searching using DuckDuckGo's Instant Answer API.
Tool for web searching using DuckDuckGo's Instant Answer API.
This tool provides quick answers and definitions without requiring an API key. It's best suited for factual queries, definitions, and quick lookups.
Note: This uses DuckDuckGo's free Instant Answer API which provides:
- Definitions from Wikipedia
- Quick facts
- Related topics
- Disambiguation pages
It does NOT provide full web search results (that would require a paid API).
Attributes
- Example
-
{ import org.llm4s.toolapi.builtin.search._ val searchTool = WebSearchTool.create() val tools = new ToolRegistry(Seq(searchTool)) agent.run("What is Scala programming language?", tools)}
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
WebSearchTool.type
Value members
Concrete fields
All search tools with default configuration.
All search tools with default configuration.