serpapi

package
v0.1.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 22, 2024 License: MIT Imports: 7 Imported by: 1

Documentation

Overview

Package serpapi contains an implementation of the tool interface with the serapi.

Index

Constants

This section is empty.

Variables

View Source
var ErrMissingToken = errors.New("missing the serpapi API key, set it in the SERPAPI_API_KEY environment variable")

Functions

This section is empty.

Types

type Option added in v0.1.13

type Option func(*options)

func WithAPIKey added in v0.1.13

func WithAPIKey(apiKey string) Option

WithAPIKey passes the Serpapi API token to the client. If not set, the token is read from the SERPAPI_API_KEY environment variable.

type Tool

type Tool struct {
	CallbacksHandler callbacks.Handler
	// contains filtered or unexported fields
}

func New

func New(opts ...Option) (*Tool, error)

New creates a new serpapi tool to search on internet.

func (Tool) Call

func (t Tool) Call(ctx context.Context, input string) (string, error)

func (Tool) Description

func (t Tool) Description() string

func (Tool) Name

func (t Tool) Name() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL