service

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExtractInput

type ExtractInput struct {
	Url string `json:"url" jsonschema:"the url the web page to extract content from"`
}

type ExtractReply

type ExtractReply struct {
	Content string `json:"content" jsonschema:"the content extracted from the web page"`
}

type Provider

type Provider string
const (
	ProviderWikipedia  Provider = "wikipedia"
	ProviderDuckDuckGo Provider = "duckduckgo"
	ProviderHackerNews Provider = "hackernews"
	ProviderWebkit     Provider = "webkit"
)

type SearchInput

type SearchInput struct {
	Query   string   `json:"query" jsonschema:"the query to search for"`
	Hashtag []string `json:"hashtag,omitempty" jsonschema:"hashtag to scope search results"`
}

type SearchReply

type SearchReply struct {
	Facts []websearch.Fact `json:"facts" jsonschema:"the facts to return to the client"`
}

type Server

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

func New

func New(provider Provider) (server *Server, err error)

func (*Server) Close

func (srv *Server) Close() error

func (*Server) Extracts

func (*Server) Run

func (srv *Server) Run(ctx context.Context) error

func (*Server) Search

Jump to

Keyboard shortcuts

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