Skip to content

Commit

Permalink
Merge pull request #52 from fumito-ito/feature/support-3-5-haiku
Browse files Browse the repository at this point in the history
add 3.5 Haiku and update 3.5 Sonnet
  • Loading branch information
fumito-ito authored Nov 5, 2024
2 parents ad327cb + 9a0cb7b commit bd87492
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions 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 @@ -53,6 +58,8 @@ extension Model {
return "claude-3-haiku-20240307"
case .claude_3_5_Sonnet:
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 bd87492

Please sign in to comment.