wikipedia

package
v0.3.8 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: Apache-2.0 Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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