Skip to content
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

Add o1 models to library #23

Merged
merged 1 commit into from
Sep 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions models/chat_completions.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,16 @@ const (

// GPT4o20240503 is a snapshot of gpt-4o from May 13th, 2024.
GPT4o20240503

// O1Preview is a part of the o1 series of large language models, which are trained with reinforcement learning to
// perform complex reasoning. o1 models think before they answer, producing a long internal chain of thought before
// responding to the user.
O1Preview

// O1Mini is a part of the o1 series of large language models, which are trained with reinforcement learning to
// perform complex reasoning. o1 models think before they answer, producing a long internal chain of thought before
// responding to the user.
O1Mini
)

// String implements the fmt.Stringer interface.
Expand Down Expand Up @@ -121,6 +131,8 @@ var chatCompletionToString = map[ChatCompletion]string{
GPT4TurboPreview: "gpt-4-turbo-preview",
GPT4o: "gpt-4o",
GPT4o20240503: "gpt-4o-2024-05-13",
O1Preview: "o1-preview",
O1Mini: "o1-mini",
}

var stringToChatCompletion = map[string]ChatCompletion{
Expand All @@ -141,4 +153,6 @@ var stringToChatCompletion = map[string]ChatCompletion{
"gpt-4-turbo-preview": GPT4TurboPreview,
"gpt-4o": GPT4o,
"gpt-4o-2024-05-13": GPT4o20240503,
"o1-preview": O1Preview,
"o1-mini": O1Mini,
}
Loading