Documentation
¶
Overview ¶
Package decision compiles typed decision requests into candidate-scoring prompts and converts the resulting logits into /v1/systemone responses.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Choice ¶
type Choice struct {
Code string `json:"code"`
Value any `json:"value"`
Description any `json:"description"`
}
Choice maps a single-token answer code to a value in the question's schema.
type ChoiceAnswer ¶
type ChoiceAnswer struct {
Type string `json:"type"`
Choice string `json:"choice"`
Probabilities *Probabilities `json:"probabilities"`
Confidence float64 `json:"confidence"`
}
type Compiled ¶
type Compiled struct {
Request llm.ScoreRequest
// contains filtered or unexported fields
}
type Field ¶
type Field struct {
Name string `json:"name"`
Description string `json:"description"`
Choices []Choice `json:"choices"`
}
Field is a question's schema as presented to the model.
type NoulAnswer ¶
type Probabilities ¶
type Probabilities = orderedmap.Map[string, float64]
type Question ¶
type Question struct {
Type string `json:"type"`
Instructions json.RawMessage `json:"instructions"`
Criteria json.RawMessage `json:"criteria"`
}
type Questions ¶
type Questions = orderedmap.Map[string, Question]
Questions preserves request order, which determines the order of scored fields. Its zero value is ready to use with Set.
type Request ¶
type Request struct {
Model string `json:"model"`
State json.RawMessage `json:"state"`
Images []api.ImageData `json:"images,omitempty"`
Videos []json.RawMessage `json:"videos,omitempty"`
Questions *Questions `json:"questions"`
KeepAlive *api.Duration `json:"keep_alive,omitempty"`
}
type ScoreAnswer ¶
type ScoreAnswer struct {
Type string `json:"type"`
Score float64 `json:"score"`
Legend *Legend `json:"legend"`
Probabilities *Probabilities `json:"probabilities"`
Confidence float64 `json:"confidence"`
}
Click to show internal directories.
Click to hide internal directories.