summary

package
v0.0.0-...-e686d8b Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

View Source
const (
	DefaultSummaryLimitToken = 4000
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Summary

type Summary struct {
	// contains filtered or unexported fields
}

func NewSummary

func NewSummary(log logger.Logger, l llm.LLM, limitToken int, ps map[string]string) *Summary

func (*Summary) MapReduce

func (s *Summary) MapReduce(ctx context.Context, docs []string) (string, map[string]int, error)

func (*Summary) Stuff

func (s *Summary) Stuff(ctx context.Context, docs []string) (string, map[string]int, error)

func (*Summary) Summary

func (s *Summary) Summary(ctx context.Context, docs []string, summaryType SummaryType) (string, map[string]int, error)

type SummaryType

type SummaryType string
const (
	Stuff     SummaryType = "Stuff"
	MapReduce SummaryType = "MapReduce"
	Refine    SummaryType = "Refine"
)

Jump to

Keyboard shortcuts

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