Merge pull request #905 from trheyi/main
feat: Extend SchemaProperty and Parameter structures with new fields
This commit is contained in:
commit
f46c445d52
1 changed files with 4 additions and 2 deletions
|
|
@ -21,6 +21,7 @@ type Tool struct {
|
||||||
type SchemaProperty struct {
|
type SchemaProperty struct {
|
||||||
Type string `json:"type,omitempty"`
|
Type string `json:"type,omitempty"`
|
||||||
Description string `json:"description,omitempty"`
|
Description string `json:"description,omitempty"`
|
||||||
|
Items Parameter `json:"items,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parameter represents the parameters field in function calling format
|
// Parameter represents the parameters field in function calling format
|
||||||
|
|
@ -29,6 +30,7 @@ type Parameter struct {
|
||||||
Properties map[string]SchemaProperty `json:"properties,omitempty"`
|
Properties map[string]SchemaProperty `json:"properties,omitempty"`
|
||||||
Required []string `json:"required,omitempty"`
|
Required []string `json:"required,omitempty"`
|
||||||
AdditionalProperties bool `json:"additionalProperties"`
|
AdditionalProperties bool `json:"additionalProperties"`
|
||||||
|
Strict bool `json:"strict,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Example returns a formatted example of how to use this tool
|
// Example returns a formatted example of how to use this tool
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue