mirror of
https://github.com/mudler/cogito.git
synced 2026-07-23 18:35:23 -04:00
af41faaa19
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
14 lines
271 B
Go
14 lines
271 B
Go
package structures
|
|
|
|
import "github.com/sashabaranov/go-openai/jsonschema"
|
|
|
|
type Structure struct {
|
|
Schema jsonschema.Definition
|
|
Object any
|
|
}
|
|
|
|
func structureType[T any](definition jsonschema.Definition) (Structure, *T) {
|
|
var t T
|
|
return Structure{definition, &t}, &t
|
|
}
|