Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ Calling `.Messages.NewStreaming()` or [setting a custom timeout](#timeouts) disa
Request parameters that correspond to file uploads in multipart requests are typed as
`io.Reader`. The contents of the `io.Reader` will by default be sent as a multipart form
part with the file name of "anonymous_file" and content-type of "application/octet-stream", so we
recommend always specifyig a custom content-type with the `anthropic.File(reader io.Reader, filename string, contentType string)`
recommend always specifying a custom content-type with the `anthropic.File(reader io.Reader, filename string, contentType string)`
helper we provide to easily wrap any `io.Reader` with the appropriate file name and content type.

```go
Expand Down
4 changes: 2 additions & 2 deletions examples/tools-streaming-jsonschema/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ type GetTemperatureUnitInput struct {
var GetTemperatureUnitInputSchema = GenerateSchema[GetTemperatureUnitInput]()

func GetTemperatureUnit(country string) string {
return "farenheit"
return "fahrenheit"
}

// Get Weather
Expand All @@ -180,7 +180,7 @@ type GetWeatherResponse struct {

func GetWeather(lat, long float64, unit string) GetWeatherResponse {
return GetWeatherResponse{
Unit: "farenheit",
Unit: "fahrenheit",
Temperature: 122,
}
}
Expand Down
6 changes: 3 additions & 3 deletions examples/tools-streaming/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func main() {
Properties: map[string]interface{}{
"lat": map[string]interface{}{
"type": "number",
"description": "The lattitude of the location to check weather.",
"description": "The latitude of the location to check weather.",
},
"long": map[string]interface{}{
"type": "number",
Expand Down Expand Up @@ -181,7 +181,7 @@ func GetCoordinates(location string) CoordinateResponse {
}

func GetTemperatureUnit(country string) string {
return "farenheit"
return "fahrenheit"
}

type WeatherResponse struct {
Expand All @@ -191,7 +191,7 @@ type WeatherResponse struct {

func GetWeather(lat, long float64, unit string) WeatherResponse {
return WeatherResponse{
Unit: "farenheit",
Unit: "fahrenheit",
Temperature: 122,
}
}
Expand Down
6 changes: 3 additions & 3 deletions examples/tools/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func main() {
Properties: map[string]interface{}{
"lat": map[string]interface{}{
"type": "number",
"description": "The lattitude of the location to check weather.",
"description": "The latitude of the location to check weather.",
},
"long": map[string]interface{}{
"type": "number",
Expand Down Expand Up @@ -172,7 +172,7 @@ func GetCoordinates(location string) CoordinateResponse {
}

func GetTemperatureUnit(country string) string {
return "farenheit"
return "fahrenheit"
}

type WeatherResponse struct {
Expand All @@ -182,7 +182,7 @@ type WeatherResponse struct {

func GetWeather(lat, long float64, unit string) WeatherResponse {
return WeatherResponse{
Unit: "farenheit",
Unit: "fahrenheit",
Temperature: 122,
}
}
Expand Down