Documentation
¶
Index ¶
- type CombinedDocument
- type MapReduceCombineDocument
- func (M *MapReduceCombineDocument) Combine(ctx context.Context, docs []string, options ...func(*model.Option)) (output string, err error)
- func (M *MapReduceCombineDocument) Run(ctx context.Context, input map[string]string, options ...func(*model.Option)) (output map[string]string, err error)
- func (M *MapReduceCombineDocument) SimpleRun(ctx context.Context, input string, options ...func(*model.Option)) (output string, err error)
- type StuffCombineDocument
- func (S *StuffCombineDocument) Combine(ctx context.Context, docs []string, options ...func(*model.Option)) (output string, err error)
- func (S *StuffCombineDocument) Run(ctx context.Context, input map[string]string, options ...func(*model.Option)) (output map[string]string, err error)
- func (S *StuffCombineDocument) SimpleRun(ctx context.Context, input string, options ...func(*model.Option)) (output string, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CombinedDocument ¶
type MapReduceCombineDocument ¶
type MapReduceCombineDocument struct {
// contains filtered or unexported fields
}
MapReduceCombineDocument Combining documents by mapping a chain over them first, then combining results.
func NewMapReduceCombineDocument ¶
func NewMapReduceCombineDocument(mapPrompt *prompt.PromptTemplate, reducePrompt *prompt.PromptTemplate, promptTemplateKey string, llmChain *llm_chain.LLMChain, splitter textsplitter.TextSplitter, maxDocLength int, callbackManager *callback.Manager, verbose bool) *MapReduceCombineDocument
NewMapReduceCombineDocument creates new instance of MapReduceCombineDocument
func (*MapReduceCombineDocument) Combine ¶
func (M *MapReduceCombineDocument) Combine(ctx context.Context, docs []string, options ...func(*model.Option)) (output string, err error)
Combine run the mapreduce process
type StuffCombineDocument ¶
type StuffCombineDocument struct {
// contains filtered or unexported fields
}
StuffCombineDocument chain to feed text document to LLM with specified prompt
func NewStuffCombineDocument ¶
func NewStuffCombineDocument(callbackManager *callback.Manager, prompt *prompt.PromptTemplate, templateKey string, llmChain *llm_chain.LLMChain, verbose bool) *StuffCombineDocument
NewStuffCombineDocument creates new instance of StuffCombineDocument
func (*StuffCombineDocument) Combine ¶
func (S *StuffCombineDocument) Combine(ctx context.Context, docs []string, options ...func(*model.Option)) (output string, err error)
Combine concatenate the given document and then feed to LLM
Click to show internal directories.
Click to hide internal directories.