Documentation
¶
Overview ¶
Package document contains Document structs and Parsers prepare for RAG
Index ¶
- func EscapeMarkdown(s string) string
- func StripUnprintable(s string) string
- type Content
- func (d *Content) Bytes() []byte
- func (d *Content) Meta() map[string]string
- func (d *Content) ReadFrom(r io.Reader) (int64, error)
- func (d *Content) String() string
- func (d *Content) Write(p []byte) (n int, err error)
- func (d *Content) WriteAt(p []byte, off int64) (n int, err error)
- func (d *Content) WriteTo(w io.Writer) (n int64, err error)
- type Document
- type File
- type FileInfo
- type Http
- type HttpConfig
- type HttpOption
- type Parser
- type ParserReader
- type S3
- type S3Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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 Content ¶ added in v1.1.9
type Content struct {
// contains filtered or unexported fields
}
Content is a document container with metadata
func (*Content) Write ¶ added in v1.1.9
Write implements the io.Writer interface. It appends the given data to the content of the document.
type FileInfo ¶ added in v1.1.9
type FileInfo struct {
// contains filtered or unexported fields
}
FileInfo represents the file information for an S3 object.
type Http ¶
type Http struct {
Content
// contains filtered or unexported fields
}
func NewHttp ¶
func NewHttp(opts ...HttpOption) (*Http, error)
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(url string) HttpOption
func WithPayload ¶
func WithPayload(payload io.Reader) HttpOption
type ParserReader ¶ added in v1.1.9
type S3 ¶ added in v1.1.9
type S3 struct {
Content Content
// contains filtered or unexported fields
}
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.