Skip to content

Commit

Permalink
feat: add GPT-4o model and update model tests
Browse files Browse the repository at this point in the history
Add GPT-4o model with details and update model tests accordingly.
  • Loading branch information
hanrw committed May 16, 2024
1 parent 5226941 commit e0d5c8f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ value class Model(val value: String) {
*/
val GPT_4_TURBO = Model("gpt-4-turbo")

/**
* New GPT-4o Our most advanced, multimodal flagship model that’s cheaper and faster than GPT-4 Turbo. Currently points to gpt-4o-2024-05-13.
*/
val GPT_4O = Model("gpt-4o")

/**
* GPT-4 model with the ability to understand images, in addition to all other GPT-4 Turbo capabilities.
* This is a preview model, we recommend developers to now use gpt-4-turbo which includes vision capabilities.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ class ModelTest {
fun `should return model from value`() {
assertEquals(Model.GPT_3_5_TURBO, Model("gpt-3.5-turbo"))
assertEquals(Model.GPT_3_5_TURBO_0125, Model("gpt-3.5-turbo-0125"))
assertEquals(Model.GPT_4_TURBO, Model("gpt-4-turbo"))
assertEquals(Model.GPT4_VISION_PREVIEW, Model("gpt-4-vision-preview"))
assertEquals(Model.GPT_4O, Model("gpt-4o"))
assertEquals(Model.DALL_E_2, Model("dall-e-2"))
assertEquals(Model.DALL_E_3, Model("dall-e-3"))
}

@Test
Expand All @@ -18,6 +23,7 @@ class ModelTest {
assertEquals("gpt-3.5-turbo-0125", Model.GPT_3_5_TURBO_0125.value)
assertEquals("gpt-4-turbo", Model.GPT_4_TURBO.value)
assertEquals("gpt-4-vision-preview", Model.GPT4_VISION_PREVIEW.value)
assertEquals("gpt-4o", Model.GPT_4O.value)
assertEquals("dall-e-2", Model.DALL_E_2.value)
assertEquals("dall-e-3", Model.DALL_E_3.value)
}
Expand Down

0 comments on commit e0d5c8f

Please sign in to comment.