solving

package
v0.1.65 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: Apache-2.0 Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package solving is the solution of tasks from paper by AI: a model sees the task's crop, as app cut it from the photo of the page, with the tasks on it it is to solve, each by its number and its statement as the reading of the statement gave them, solves each, and gives its answer — a number, or the label of an option the page prints — or none when the task has no one answer of these kinds. The program holds the answer to the rules of a key and compares the reading of the work with it (module-kit's paper); the model never judges the learner's work. It is the capability task_solving of spec's admission table, and serves a task whose statement is no formula the solver takes.

Index

Constants

View Source
const (
	KindNumber = "number"
	KindChoice = "choice"
	KindNone   = "none"
)

The kinds of an answer, as the schema names them.

View Source
const MaxOutputTokens = 16000

MaxOutputTokens is the most a call may write, thinking included: the bound of the runner's calls, as for every call of the library that reasons.

View Source
const Version = 2

Version is the version of the prompt. A change to a word a model reads is a new version, and the entry of the list that admitted the prompt admits it no longer. TestFrozenV2 holds it.

Variables

View Source
var Schema = map[string]any{
	"type":                 "object",
	"additionalProperties": false,
	"required":             []string{"answers"},
	"properties":           schemaProperties,
}

Schema is the answer every model returns.

Functions

func Answered

func Answered(answers map[int]*paperv1.Answer) (string, error)

Answered is the answer of a model that gives the Answer of each task by its number, or none for nil, as Read takes it back: what the runner's stub answers by the truth of a case.

func Fingerprint

func Fingerprint() string

Fingerprint names the prompt: the SHA-256 of every word a model reads besides the crop — the instructions, the label, the text and the schema, whose names the model reads too. An entry of the list of admitted models holds it (admission.Entry).

func Instructions

func Instructions() string

Instructions are the instructions of every request.

func Read

func Read(answer string, asked []Task) (map[int]*paperv1.Answer, error)

Read takes a model's answer apart as strictly as the schema, into the Answer of each task asked, by its number, nil for the kind none. An answer of a task not asked, or two of one, is off the schema; a task asked with no answer has none. The fields of the other kind are not read. Whether an answer holds to the rules of a key module-kit says (paper.Breach): an answer that breaks one is no key, and no failure of the call.

func RequestOf

func RequestOf(crop provider.Image, width, height int, tasks []Task) provider.Request

RequestOf is what the solution asks of a model about a task's crop, as provider.Photo gives it, of width × height px: the instructions, the crop after its label, its size and the tasks to solve, which are data, a model's reading of the page. The model, its effort and how many tokens it may write the caller sets.

Types

type Task

type Task struct {
	Number    int
	Statement string
}

Task is a task of the crop to solve: its number on the crop, from 1, and its statement as the reading of the statement gave it.

Jump to

Keyboard shortcuts

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