Skip to content

Commit

Permalink
Merge pull request #39 from kris-hansen/anthropic-update
Browse files Browse the repository at this point in the history
feat: latest anthropic models
  • Loading branch information
kris-hansen authored Feb 25, 2025
2 parents fb69744 + 449b3b4 commit bdcf6ae
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 1 deletion.
3 changes: 3 additions & 0 deletions cmd/configure.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ func getAnthropicModels() []string {
"claude-3-5-sonnet-20241022",
"claude-3-5-sonnet-latest",
"claude-3-5-haiku-latest",
"claude-3-7-sonnet-20250219",
"claude-3-7-sonnet-latest",
"claude-3-5-haiku-20241022",
}
}

Expand Down
29 changes: 29 additions & 0 deletions examples/model-examples/claude-3-7-example.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Example of using Claude 3.7 Sonnet model
# This example demonstrates using the dated version of Claude 3.7 Sonnet

step_one:
input: examples/test.csv
model: claude-3-7-sonnet-20250219
action: "Analyze this CSV file and provide detailed insights about the data."
output: STDOUT

# Example of using Claude 3.7 Sonnet latest
step_two:
input: examples/test.csv
model: claude-3-7-sonnet-latest
action: "Analyze this CSV file and provide detailed insights about the data."
output: STDOUT

# Example of using Claude 3.5 Haiku latest
step_three:
input: examples/test.csv
model: claude-3-5-haiku-latest
action: "Analyze this CSV file and list the key points."
output: STDOUT

# Example of using Claude 3.5 Haiku with specific date
step_four:
input: examples/test.csv
model: claude-3-5-haiku-20241022
action: "Analyze this CSV file and list the key points."
output: STDOUT
10 changes: 9 additions & 1 deletion utils/models/anthropic.go
Original file line number Diff line number Diff line change
Expand Up @@ -322,9 +322,16 @@ func (a *AnthropicProvider) ValidateModel(modelName string) bool {
"claude-3-5-sonnet-20241022",
"claude-3-5-sonnet-latest",
"claude-3-5-haiku-latest",
"claude-3-7-sonnet-20250219",
"claude-3-7-sonnet-latest",
"claude-3-5-haiku-20241022",
}

modelName = strings.ToLower(modelName)
// Trim whitespace and convert to lowercase
modelName = strings.TrimSpace(strings.ToLower(modelName))

// Add extra debug logging
a.debugf("Checking model '%s' against valid models: %v", modelName, validModels)
// Check exact matches
for _, valid := range validModels {
if modelName == valid {
Expand All @@ -337,6 +344,7 @@ func (a *AnthropicProvider) ValidateModel(modelName string) bool {
modelFamilies := []string{
"claude-3-5-sonnet",
"claude-3-5-haiku",
"claude-3-7-sonnet",
}

for _, family := range modelFamilies {
Expand Down

0 comments on commit bdcf6ae

Please sign in to comment.