api

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(schema string, opts ...Option) ([]tool.Tool, error)

New initializes a new api client from parse schema

Types

type Option

type Option func(*Tool)

An Option is an option for Bidi processing.

func WithSuffix

func WithSuffix(suffix string) Option

type Tool

type Tool struct {
	// contains filtered or unexported fields
}

Tool defines a tool implementation for the DuckDuckGo Search.

func (Tool) Call

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

Call performs the search and return the result.

func (Tool) Description

func (t Tool) Description() string

Description returns a description for the tool.

func (Tool) Name

func (t Tool) Name() string

Name returns a name for the tool.

func (Tool) Schema

func (t Tool) Schema() *tool.PropertiesSchema

func (Tool) Strict

func (t Tool) Strict() bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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