Skip to content

Commit

Permalink
'claude' mutator updated to use claude-2 by default
Browse files Browse the repository at this point in the history
  • Loading branch information
batmac committed Jul 11, 2023
1 parent 37f907c commit 6e91efd
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 13 deletions.
30 changes: 19 additions & 11 deletions pkg/miniclaude/claude.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,25 @@ const (
PromptAI = "\n\nAssistant:"
MessageDone = "[DONE]"

ModelClaudeV1 string = "claude-v1"
ModelClaudeV1_100K string = "claude-v1-100k"
ModelClaudeV10 string = "claude-v1.0"
ModelClaudeV12 string = "claude-v1.2"
ModelClaudeV13 string = "claude-v1.3"
ModelClaudeV13_100K string = "claude-v1.3-100k"
ModelClaudeInstantV1 string = "claude-instant-v1"
ModelClaudeInstantV1_100K string = "claude-instant-v1-100k"
ModelClaudeInstantV10 string = "claude-instant-v1.0"
ModelClaudeInstantV11 string = "claude-instant-v1.1"
ModelClaudeInstantV11_100K string = "claude-instant-v1.1-100k"
// https://docs.anthropic.com/claude/reference/selecting-a-model
ModelClaudeLatest = "claude-2" // latest model family, manually updated
ModelClaude2 = "claude-2" // latest major version
ModelClaude20 = "claude-2.0" // latest full version
ModelClaudeInstantLatest = "claude-instant-1" // latest instant model family, manually updated
ModelClaudeInstant1 = "claude-instant-1" // latest instant major version
ModelClaudeInstant11 = "claude-instant-1.1" // latest instant full version

// old deprecated models, keeped for compatibility
ModelClaudeV1_100K = "claude-v1-100k"
ModelClaudeV10 = "claude-v1.0"
ModelClaudeV12 = "claude-v1.2"
ModelClaudeV13 = "claude-v1.3"
ModelClaudeV13_100K = "claude-v1.3-100k"
ModelClaudeInstantV1 = "claude-instant-v1"
ModelClaudeInstantV1_100K = "claude-instant-v1-100k"
ModelClaudeInstantV10 = "claude-instant-v1.0"
ModelClaudeInstantV11 = "claude-instant-v1.1"
ModelClaudeInstantV11_100K = "claude-instant-v1.1-100k"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion pkg/miniclaude/claude_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func TestNewSimpleSamplingParameters(t *testing.T) {
name string
args args
}{
{"donotpanicplease", args{"hi", "claude-v1"}},
{"donotpanicplease", args{"hi", miniclaude.ModelClaudeLatest}},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/mutators/single/anthropic.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func claude(w io.WriteCloser, r io.ReadCloser, conf any) (int64, error) {
}
}

model := miniclaude.ModelClaudeV1
model := miniclaude.ModelClaudeLatest // latest model
if len(args) >= 2 && args[1] != "" {
model = args[1]
}
Expand Down

0 comments on commit 6e91efd

Please sign in to comment.