-
Notifications
You must be signed in to change notification settings - Fork 319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[OPIK-744] fix providers' models list #1041
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
c5f13bb
OPIK-744 openai models list
idoberko2 7c47302
OPIK-744 anthropic models list
idoberko2 933d570
OPIK-744 code cleanup
idoberko2 d18f06c
OPIK-744 use existing enum for openai
idoberko2 000354e
OPIK-744 ignore default
idoberko2 fd36b12
OPIK-744 added missing openai models
idoberko2 6d8911f
OPIK-744 post rebase changes
idoberko2 c3ca2e0
OPIK-744 rename `ModelPrice` to `OpenaiModelPrice`
idoberko2 92f67da
Revert "OPIK-744 rename `ModelPrice` to `OpenaiModelPrice`"
idoberko2 c5fd856
Revert "OPIK-744 use existing enum for openai"
idoberko2 49347d2
OPIK-744 post revert fixes
idoberko2 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
apps/opik-backend/src/main/java/com/comet/opik/domain/llmproviders/AnthropicModelName.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.comet.opik.domain.llmproviders; | ||
|
||
import lombok.RequiredArgsConstructor; | ||
|
||
/** | ||
* This information is taken from <a href="https://docs.anthropic.com/en/docs/about-claude/models">Anthropic docs</a> | ||
*/ | ||
@RequiredArgsConstructor | ||
public enum AnthropicModelName { | ||
CLAUDE_3_5_SONNET_LATEST("claude-3-5-sonnet-latest"), | ||
CLAUDE_3_5_SONNET_20241022("claude-3-5-sonnet-20241022"), | ||
CLAUDE_3_5_HAIKU_LATEST("claude-3-5-haiku-latest"), | ||
CLAUDE_3_5_HAIKU_20241022("claude-3-5-haiku-20241022"), | ||
CLAUDE_3_5_SONNET_20240620("claude-3-5-sonnet-20240620"), | ||
CLAUDE_3_OPUS_LATEST("claude-3-opus-latest"), | ||
CLAUDE_3_OPUS_20240229("claude-3-opus-20240229"), | ||
CLAUDE_3_SONNET_20240229("claude-3-sonnet-20240229"), | ||
CLAUDE_3_HAIKU_20240307("claude-3-haiku-20240307"), | ||
; | ||
|
||
private final String value; | ||
|
||
@Override | ||
public String toString() { | ||
return value; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
apps/opik-backend/src/main/java/com/comet/opik/domain/llmproviders/OpenaiModelName.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package com.comet.opik.domain.llmproviders; | ||
|
||
import lombok.RequiredArgsConstructor; | ||
|
||
/** | ||
* This information is taken from <a href="https://platform.openai.com/docs/models">openai docs</a> | ||
*/ | ||
@RequiredArgsConstructor | ||
public enum OpenaiModelName { | ||
CHATGPT_4O_LATEST("chatgpt-4o-latest"), | ||
GPT_4O("gpt-4o"), | ||
GPT_4O_2024_05_13("gpt-4o-2024-05-13"), | ||
GPT_4O_2024_08_06("gpt-4o-2024-08-06"), | ||
GPT_4O_2024_11_20("gpt-4o-2024-11-20"), | ||
GPT_4O_MINI("gpt-4o-mini"), | ||
GPT_4O_MINI_2024_07_18("gpt-4o-mini-2024-07-18"), | ||
GPT_3_5_TURBO("gpt-3.5-turbo"), | ||
GPT_3_5_TURBO_1106("gpt-3.5-turbo-1106"), | ||
GPT_3_5_TURBO_0125("gpt-3.5-turbo-0125"), | ||
GPT_4("gpt-4"), | ||
GPT_4_0613("gpt-4-0613"), | ||
GPT_4_0314("gpt-4-0314"), | ||
GPT_4_TURBO("gpt-4-turbo"), | ||
GPT_4_TURBO_2024_04_09("gpt-4-turbo-2024-04-09"), | ||
GPT_4_TURBO_PREVIEW("gpt-4-turbo-preview"), | ||
GPT_4_1106_PREVIEW("gpt-4-1106-preview"), | ||
GPT_4_0125_PREVIEW("gpt-4-0125-preview"), | ||
GPT_O1("o1"), | ||
GPT_O1_2024_12_17("o1-2024-12-17"), | ||
GPT_O1_MINI("o1-mini"), | ||
GPT_O1_MINI_2024_09_12("o1-mini-2024-09-12"), | ||
GPT_O1_PREVIEW("o1-preview"), | ||
GPT_O1_PREVIEW_2024_09_12("o1-preview-2024-09-12"), | ||
; | ||
|
||
private final String value; | ||
|
||
@Override | ||
public String toString() { | ||
return value; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have a similar list in ModelPrice. Can we try to unify both lists?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch! I completely forgot about this one. Updated.
@BorisTkachenko, I noticed a few openai models missing in
ModelPrice
and added them. Your review will be appreciated. In addition, can we consider renamingModelPrice
to be openai specific? Something likeOpenaiModelPrice
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@idoberko2 Feel free to rename, seems ok to me. Regarding new models they sometimes add them, so list should be updated. However I'm not sure about those two:
gpt-4-0613, gpt-4-turbo-preview
.It looks like they are not listed under OpenAI prices, so I guess we do not need them:
https://openai.com/api/pricing/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are used as aliases and therefore can be used by users, see here: https://platform.openai.com/docs/models#gpt-4-turbo-and-gpt-4