wikipedia

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Wikipedia)

Option configures Wikipedia.

func WithLanguage

func WithLanguage(lang string) Option

WithLanguage sets the Wikipedia language (e.g. "en", "de").

func WithLimit

func WithLimit(n int) Option

WithLimit sets the max results (default 5).

type Wikipedia

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

Wikipedia searches Wikipedia and returns article excerpts. Free, no API key.

func New

func New(opts ...Option) *Wikipedia

New returns a new Wikipedia tool.

func (*Wikipedia) Description

func (*Wikipedia) Description() string

func (*Wikipedia) DisplayName added in v0.1.4

func (*Wikipedia) DisplayName() string

func (*Wikipedia) Execute

func (w *Wikipedia) Execute(ctx context.Context, args map[string]any) (any, error)

func (*Wikipedia) Name

func (*Wikipedia) Name() string

func (*Wikipedia) Parameters

func (*Wikipedia) Parameters() interfaces.JSONSchema

Jump to

Keyboard shortcuts

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