mirror of
https://github.com/mudler/cogito.git
synced 2026-07-23 18:35:23 -04:00
950e28d7b3
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
23 lines
529 B
Go
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"},
|
|
})
|
|
}
|