Skip to content

Commit

Permalink
add haiku and update sonnet
Browse files Browse the repository at this point in the history
  • Loading branch information
fumito-ito committed Oct 24, 2024
1 parent 34fb991 commit 5ee2dac
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Sources/AnthropicSwiftSDK/Entity/Model.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ public enum Model {
/// Most intelligent model, combining top-tier performance with improved speed.
// swiftlint:disable:next identifier_name
case claude_3_5_Sonnet
/// Most intelligent model, combining top-tier performance with improved speed.
// swiftlint:disable:next identifier_name
case claude_3_5_Haiku
/// Custom Model
case custom(String)

Expand All @@ -36,6 +39,8 @@ public enum Model {
self = .claude_3_Haiku
case Model.claude_3_5_Sonnet.stringfy:
self = .claude_3_5_Sonnet
case Model.claude_3_5_Haiku.stringfy:
self = .claude_3_5_Haiku
default:
self = .custom(modelName)
}
Expand All @@ -52,7 +57,9 @@ extension Model {
case .claude_3_Haiku:
return "claude-3-haiku-20240307"
case .claude_3_5_Sonnet:
return "claude-3-5-sonnet-20240620"
return "claude-3-5-sonnet-20241022"
case .claude_3_5_Haiku:
return "claude-3-5-haiku-20241029"
case let .custom(modelName):
return modelName
}
Expand Down

0 comments on commit 5ee2dac

Please sign in to comment.