Skip to content

Commit

Permalink
Merge pull request #189 from nemoo/current-models-and-docs
Browse files Browse the repository at this point in the history
Support gpt-4o-mini
  • Loading branch information
adamw authored Jul 26, 2024
2 parents 5492e74 + 06da473 commit d807833
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ object Main extends App {
)
)

// use ChatCompletionModel.CustomChatCompletionModel("gpt-some-future-version") for models not yet supported here
val chatRequestBody: ChatBody = ChatBody(
model = ChatCompletionModel.GPT35Turbo,
model = ChatCompletionModel.GPT4oMini,
messages = bodyMessages
)

Expand All @@ -66,7 +67,7 @@ object Main extends App {
ChatResponse(
chatcmpl-79shQITCiqTHFlI9tgElqcbMTJCLZ,chat.completion,
1682589572,
gpt-3.5-turbo-0301,
gpt-4o-mini,
Usage(10,10,20),
List(
Choices(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ object ChatRequestBody {

case object GPT4o extends ChatCompletionModel("gpt-4o")

case object GPT4oMini extends ChatCompletionModel("gpt-4o-mini")

case class CustomChatCompletionModel(customChatCompletionModel: String) extends ChatCompletionModel(customChatCompletionModel)

val values: Set[ChatCompletionModel] =
Expand All @@ -155,7 +157,8 @@ object ChatRequestBody {
GPT35Turbo0301,
GPT4Turbo,
GPT4TurboVision,
GPT4o
GPT4o,
GPT4oMini
)

private val byChatModelValue = values.map(model => model.value -> model).toMap
Expand Down

0 comments on commit d807833

Please sign in to comment.