Skip to content

Commit

Permalink
feat: add computer use parameters of ToolDefinition
Browse files Browse the repository at this point in the history
  • Loading branch information
shadowpigy committed Dec 12, 2024
1 parent 56272fe commit af2596e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion message.go
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,15 @@ type ToolDefinition struct {
// or you can pass in a struct which serializes to the proper JSON schema.
// The jsonschema package is provided for convenience, but you should
// consider another specialized library if you require more complex schemas.
InputSchema any `json:"input_schema"`
InputSchema any `json:"input_schema,omitempty"`
// Type is required for Anthropic defined tools.
Type string `json:"type,omitempty"`
// DisplayWidthPx is a required parameter of the Computer Use tool.
DisplayWidthPx int `json:"display_width_px,omitempty"`
// DisplayHeightPx is a required parameter of the Computer Use tool.
DisplayHeightPx int `json:"display_height_px,omitempty"`
// DisplayNumber is an optional parameter of the Computer Use tool.
DisplayNumber *int `json:"display_number,omitempty"`

CacheControl *MessageCacheControl `json:"cache_control,omitempty"`
}
Expand Down

0 comments on commit af2596e

Please sign in to comment.