Files
cogito/structures/boolean.go
T
Ettore Di Giacinto 950e28d7b3 chore: increase compat with OpenAI API
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
2025-09-27 18:14:50 +02:00

23 lines
529 B
Go

package structures
import "github.com/sashabaranov/go-openai/jsonschema"
type Boolean struct {
Boolean bool `json:"extract_boolean"`
}
func StructureBoolean() (Structure, *Boolean) {
return structureType[Boolean](
jsonschema.Definition{
Type: jsonschema.Object,
AdditionalProperties: false,
Properties: map[string]jsonschema.Definition{
"extract_boolean": {
Type: jsonschema.Boolean,
Description: "Yes/no answer",
},
},
Required: []string{"extract_boolean"},
})
}