Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Answer ¶
type Answer struct {
Name string
Type QuestionType
Probability float64
Choice string
}
Answer is the decision model's answer to one question. Probability holds a predicate's p(true), Choice a choice's pick.
type Decider ¶
type Decider interface {
Decide(ctx context.Context, model string, evidence string, questions []Question) (Decisions, error)
}
Decider answers typed questions about shared evidence with native probabilities. model is the "provider/model" id of the decision model.
type Question ¶
type Question struct {
Name string
Type QuestionType
Instructions string
Choices []Option
}
Question is one typed question asked about shared evidence. Name identifies its answer. Choices apply to Choice questions only.
type QuestionType ¶
type QuestionType string
QuestionType is the kind of answer a question asks for.
const ( Predicate QuestionType = "predicate" Choice QuestionType = "choice" )
Question kinds: a predicate answers with one probability, a choice picks one option.
Click to show internal directories.
Click to hide internal directories.