Documentation ¶
Index ¶
- Constants
- type Creativity
- type Gopher
- type LLM
- type LLMOpt
- type Model
- type Provider
- type Task
- func (t *Task) CanProcess() bool
- func (t *Task) IsDone() bool
- func (t *Task) OutputToJSON() (string, error)
- func (t *Task) OutputToJSONStruct(out any) error
- func (t *Task) Process(ctx context.Context) error
- func (t *Task) Reader() io.Reader
- func (t *Task) WithCreativity(c Creativity) *Task
- func (t *Task) WithDependencies(dependencies ...*Task) *Task
- func (t *Task) WithDescription(description string) *Task
- func (t *Task) WithExpectedOutput(expectedOutput string) *Task
- func (t *Task) WithGopher(gopher *Gopher) *Task
- func (t *Task) WithLLM(llm *LLM) *Task
Constants ¶
View Source
const ( ModelOpenAIGpt35 = oai.GPT3Dot5Turbo0613 ModelOpenAIGpt4o = oai.GPT4o )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Creativity ¶
type Creativity float32
Also known as Temperature
const ( NotCreative Creativity = 0.0 SlightlyCreative Creativity = 0.5 SomewhatCreative Creativity = 1.0 VeryCreative Creativity = 1.5 ExtremelyCreative Creativity = 2.0 )
type Gopher ¶
func (*Gopher) WithBackstory ¶
type LLM ¶
type Task ¶
type Task struct { Description string ExpectedOutput string Output string Creativity float32 Dependencies []*Task Gopher *Gopher LLM *LLM }
func (*Task) CanProcess ¶
func (*Task) OutputToJSON ¶
Tries to marshal the output to a json string
func (*Task) OutputToJSONStruct ¶
`out` must be a struct with json tags matching the ExpectedOutput
func (*Task) WithCreativity ¶
func (t *Task) WithCreativity(c Creativity) *Task
func (*Task) WithDependencies ¶
func (*Task) WithDescription ¶
func (*Task) WithExpectedOutput ¶
func (*Task) WithGopher ¶
Click to show internal directories.
Click to hide internal directories.