Skip to content

Commit

Permalink
feat(anthropic-client): add most intelligent model CLAUDE_3_5_Sonnet
Browse files Browse the repository at this point in the history
 - Added the most intelligent model CLAUDE_3_5_Sonnet with details and tests.
  • Loading branch information
hanrw committed Jun 21, 2024
1 parent 2c2c780 commit aab64ca
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import kotlin.jvm.JvmInline

/**
* https://docs.anthropic.com/claude/docs/models-overview
* https://docs.anthropic.com/en/docs/about-claude/models
* Claude is a family of state-of-the-art large language models developed by Anthropic. Our models are designed to provide you with the best possible experience when interacting with AI, offering a range of capabilities and performance levels to suit your needs and make it easy to deploy high performing, safe, and steerable models. In this guide, we'll introduce you to our latest and greatest models, the Claude 3 family, as well as our legacy models, which are still available for those who need them.
*
*/
@Serializable
@JvmInline
Expand All @@ -26,6 +26,14 @@ value class Model(val value: String) {
*/
val CLAUDE_3_Sonnet = Model("claude-3-sonnet-20240229")

/**
* Most intelligent model
* The model costs $3 per million input tokens and $15 per million output tokens, with a 200K token context window.
* Cost (Input / Output per MTok^) $3.00 / $15.00
* Training data cut-off: Apr 2024
*/
val CLAUDE_3_5_Sonnet = Model("claude-3-5-sonnet-20240620")

/**
* Fastest and most compact model for near-instant responsiveness
* Max output length: 4096 tokens
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ import org.junit.jupiter.api.Assertions.*
import org.junit.jupiter.api.Test

class ModelTest {

@Test
fun `should return correct latest API model name`() {
assertEquals("claude-3-opus-20240229", Model.CLAUDE_3_OPUS.value)
assertEquals("claude-3-sonnet-20240229", Model.CLAUDE_3_Sonnet.value)
assertEquals("claude-3-haiku-20240307", Model.CLAUDE_3_HAIKU.value)
assertEquals("claude-3-5-sonnet-20240620", Model.CLAUDE_3_5_Sonnet.value)
}
}

0 comments on commit aab64ca

Please sign in to comment.