Documentation
¶
Overview ¶
Package document contains Document structs and Parsers prepare for RAG
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrReading = errors.New("document is reading")
Functions ¶
func EscapeMarkdown ¶ added in v1.1.8
EscapeMarkdown escapes special characters in a string for Markdown
func StripUnprintable ¶ added in v1.1.8
Types ¶
type ClosableDocument ¶
type ClosableDocument interface {
Close() error
}
type Document ¶
type Document struct {
// contains filtered or unexported fields
}
Document is a document container with metadata
type File ¶
type File struct {
Document
// contains filtered or unexported fields
}
func (*File) ReadStatus ¶
func (d *File) ReadStatus() ReadStatus
type Http ¶
type Http struct {
Document
// contains filtered or unexported fields
}
func NewHttp ¶
func NewHttp(opts ...HttpOption) (*Http, error)
func (*Http) ReadStatus ¶
func (h *Http) ReadStatus() ReadStatus
type HttpConfig ¶
type HttpConfig struct {
// contains filtered or unexported fields
}
type HttpOption ¶
type HttpOption func(*HttpConfig)
func WithHttpClient ¶
func WithHttpClient(client *http.Client) HttpOption
func WithHttpMethod ¶
func WithHttpMethod(method string) HttpOption
func WithHttpURL ¶
func WithHttpURL(link string) HttpOption
func WithPayload ¶
func WithPayload(payload io.Reader) HttpOption
type ReadableDocument ¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package parsers include different parsers implementation
|
Package parsers include different parsers implementation |
|
docx
Package docx a parser for docx
|
Package docx a parser for docx |
|
html
Package html a parser for html
|
Package html a parser for html |
|
pdf
Package pdf a parser for PDF
|
Package pdf a parser for PDF |
|
pptx
Package pptx a Parser for pptx
|
Package pptx a Parser for pptx |
|
xlsx
Package xlsx a xlsx parser
|
Package xlsx a xlsx parser |
Click to show internal directories.
Click to hide internal directories.