Documentation
¶
Index ¶
Constants ¶
View Source
const ( // For map-reduce DefaultPromptTemplateForMap = ` {{.context}} With above content, please summarize it with only half content size of it. ` DefaultPromptTemplatForReduce = `"{{.context}}"` // For post process the map-reduced summary DefaultPromptTemplateForPostMapReduce = `` /* 258-byte string literal not displayed */ DefaultSummaryMaxNumberOfConcurrent = 2 DefaultDocumentChunkSize = 1024 DefaultDocumentChunkOverlap = 100 )
Variables ¶
This section is empty.
Functions ¶
func GetChainOptions ¶
func GetChainOptions(config v1alpha1.CommonChainConfig) []chains.ChainCallOption
Types ¶
type MapReduceChain ¶
type MapReduceChain struct {
// BaseNode for this MapReduceChain
// Only chain is allowed
base.BaseNode
// MapReduceDocuments used to generate summary
chains.MapReduceDocuments
// LLMChain used to
chains.LLMChain
// contains filtered or unexported fields
}
func NewMapReduceChain ¶
func NewMapReduceChain(baseNode base.BaseNode) *MapReduceChain
func (*MapReduceChain) Ready ¶
func (l *MapReduceChain) Ready() (bool, string)
type RetrievalQAChain ¶
type RetrievalQAChain struct {
chains.ConversationalRetrievalQA
base.BaseNode
Instance *v1alpha1.RetrievalQAChain
}
func NewRetrievalQAChain ¶
func NewRetrievalQAChain(baseNode base.BaseNode) *RetrievalQAChain
func (*RetrievalQAChain) Ready ¶
func (l *RetrievalQAChain) Ready() (isReady bool, msg string)
Click to show internal directories.
Click to hide internal directories.