Allow structured outputs via function calling (#828)

This commit is contained in:
Grey Baker
2024-08-16 13:41:39 -04:00
committed by GitHub
parent dd7f5824f9
commit d86425a5cf
3 changed files with 103 additions and 0 deletions

View File

@@ -264,6 +264,7 @@ type ToolFunction struct {
type FunctionDefinition struct {
Name string `json:"name"`
Description string `json:"description,omitempty"`
Strict bool `json:"strict,omitempty"`
// Parameters is an object describing the function.
// You can pass json.RawMessage to describe the schema,
// or you can pass in a struct which serializes to the proper JSON schema.