reader

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

type Factory func() Reader

type Option

type Option func(*Options)

func WithReaderType

func WithReaderType(readerType string) Option

type Options

type Options struct {
	ReaderType string
}

type PdfReader

type PdfReader struct {
}

func (*PdfReader) Read

func (r *PdfReader) Read(url string) (string, error)

type ReadParam

type ReadParam struct {
	Url string
}

type Reader

type Reader interface {
	Read(url string) (string, error)
}

func NewPdfReader

func NewPdfReader() Reader

func NewWebsiteReader

func NewWebsiteReader() Reader

type Tool

type Tool struct {
	ReaderType string
	Reader     Reader
}

func NewReader

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

func (*Tool) Call

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

func (*Tool) Description

func (t *Tool) Description() string

func (*Tool) Name

func (t *Tool) Name() string

func (*Tool) Schema

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

func (*Tool) Strict

func (t *Tool) Strict() bool

type WebsiteReader

type WebsiteReader struct {
}

func (*WebsiteReader) Read

func (r *WebsiteReader) Read(url string) (string, error)

Jump to

Keyboard shortcuts

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