Skip to content

Commit

Permalink
feat(api): new o1 and GPT-4o models + preference fine-tuning (#142)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] committed Dec 17, 2024
1 parent 03f13fb commit a9e2f35
Show file tree
Hide file tree
Showing 10 changed files with 1,109 additions and 144 deletions.
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 68
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-2e0e0678be19d1118fd796af291822075e40538dba326611e177e9f3dc245a53.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-779ea2754025daf5e18eb8ceb203ec321692636bc3a999338556a479178efa6c.yml
2 changes: 2 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,15 @@ Params Types:
- <a href="https://pkg.go.dev/github.com/openai/openai-go">openai</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go#ChatCompletionContentPartInputAudioParam">ChatCompletionContentPartInputAudioParam</a>
- <a href="https://pkg.go.dev/github.com/openai/openai-go">openai</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go#ChatCompletionContentPartRefusalParam">ChatCompletionContentPartRefusalParam</a>
- <a href="https://pkg.go.dev/github.com/openai/openai-go">openai</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go#ChatCompletionContentPartTextParam">ChatCompletionContentPartTextParam</a>
- <a href="https://pkg.go.dev/github.com/openai/openai-go">openai</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go#ChatCompletionDeveloperMessageParam">ChatCompletionDeveloperMessageParam</a>
- <a href="https://pkg.go.dev/github.com/openai/openai-go">openai</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go#ChatCompletionFunctionCallOptionParam">ChatCompletionFunctionCallOptionParam</a>
- <a href="https://pkg.go.dev/github.com/openai/openai-go">openai</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go#ChatCompletionFunctionMessageParam">ChatCompletionFunctionMessageParam</a>
- <a href="https://pkg.go.dev/github.com/openai/openai-go">openai</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go#ChatCompletionMessageParamUnion">ChatCompletionMessageParamUnion</a>
- <a href="https://pkg.go.dev/github.com/openai/openai-go">openai</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go#ChatCompletionMessageToolCallParam">ChatCompletionMessageToolCallParam</a>
- <a href="https://pkg.go.dev/github.com/openai/openai-go">openai</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go#ChatCompletionModality">ChatCompletionModality</a>
- <a href="https://pkg.go.dev/github.com/openai/openai-go">openai</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go#ChatCompletionNamedToolChoiceParam">ChatCompletionNamedToolChoiceParam</a>
- <a href="https://pkg.go.dev/github.com/openai/openai-go">openai</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go#ChatCompletionPredictionContentParam">ChatCompletionPredictionContentParam</a>
- <a href="https://pkg.go.dev/github.com/openai/openai-go">openai</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go#ChatCompletionReasoningEffort">ChatCompletionReasoningEffort</a>
- <a href="https://pkg.go.dev/github.com/openai/openai-go">openai</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go#ChatCompletionStreamOptionsParam">ChatCompletionStreamOptionsParam</a>
- <a href="https://pkg.go.dev/github.com/openai/openai-go">openai</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go#ChatCompletionSystemMessageParam">ChatCompletionSystemMessageParam</a>
- <a href="https://pkg.go.dev/github.com/openai/openai-go">openai</a>.<a href="https://pkg.go.dev/github.com/openai/openai-go#ChatCompletionToolParam">ChatCompletionToolParam</a>
Expand Down
71 changes: 37 additions & 34 deletions chat.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,38 +30,41 @@ func NewChatService(opts ...option.RequestOption) (r *ChatService) {
type ChatModel = string

const (
ChatModelO1Preview ChatModel = "o1-preview"
ChatModelO1Preview2024_09_12 ChatModel = "o1-preview-2024-09-12"
ChatModelO1Mini ChatModel = "o1-mini"
ChatModelO1Mini2024_09_12 ChatModel = "o1-mini-2024-09-12"
ChatModelGPT4o ChatModel = "gpt-4o"
ChatModelGPT4o2024_11_20 ChatModel = "gpt-4o-2024-11-20"
ChatModelGPT4o2024_08_06 ChatModel = "gpt-4o-2024-08-06"
ChatModelGPT4o2024_05_13 ChatModel = "gpt-4o-2024-05-13"
ChatModelGPT4oRealtimePreview ChatModel = "gpt-4o-realtime-preview"
ChatModelGPT4oRealtimePreview2024_10_01 ChatModel = "gpt-4o-realtime-preview-2024-10-01"
ChatModelGPT4oAudioPreview ChatModel = "gpt-4o-audio-preview"
ChatModelGPT4oAudioPreview2024_10_01 ChatModel = "gpt-4o-audio-preview-2024-10-01"
ChatModelChatgpt4oLatest ChatModel = "chatgpt-4o-latest"
ChatModelGPT4oMini ChatModel = "gpt-4o-mini"
ChatModelGPT4oMini2024_07_18 ChatModel = "gpt-4o-mini-2024-07-18"
ChatModelGPT4Turbo ChatModel = "gpt-4-turbo"
ChatModelGPT4Turbo2024_04_09 ChatModel = "gpt-4-turbo-2024-04-09"
ChatModelGPT4_0125Preview ChatModel = "gpt-4-0125-preview"
ChatModelGPT4TurboPreview ChatModel = "gpt-4-turbo-preview"
ChatModelGPT4_1106Preview ChatModel = "gpt-4-1106-preview"
ChatModelGPT4VisionPreview ChatModel = "gpt-4-vision-preview"
ChatModelGPT4 ChatModel = "gpt-4"
ChatModelGPT4_0314 ChatModel = "gpt-4-0314"
ChatModelGPT4_0613 ChatModel = "gpt-4-0613"
ChatModelGPT4_32k ChatModel = "gpt-4-32k"
ChatModelGPT4_32k0314 ChatModel = "gpt-4-32k-0314"
ChatModelGPT4_32k0613 ChatModel = "gpt-4-32k-0613"
ChatModelGPT3_5Turbo ChatModel = "gpt-3.5-turbo"
ChatModelGPT3_5Turbo16k ChatModel = "gpt-3.5-turbo-16k"
ChatModelGPT3_5Turbo0301 ChatModel = "gpt-3.5-turbo-0301"
ChatModelGPT3_5Turbo0613 ChatModel = "gpt-3.5-turbo-0613"
ChatModelGPT3_5Turbo1106 ChatModel = "gpt-3.5-turbo-1106"
ChatModelGPT3_5Turbo0125 ChatModel = "gpt-3.5-turbo-0125"
ChatModelGPT3_5Turbo16k0613 ChatModel = "gpt-3.5-turbo-16k-0613"
ChatModelO1 ChatModel = "o1"
ChatModelO1_2024_12_17 ChatModel = "o1-2024-12-17"
ChatModelO1Preview ChatModel = "o1-preview"
ChatModelO1Preview2024_09_12 ChatModel = "o1-preview-2024-09-12"
ChatModelO1Mini ChatModel = "o1-mini"
ChatModelO1Mini2024_09_12 ChatModel = "o1-mini-2024-09-12"
ChatModelGPT4o ChatModel = "gpt-4o"
ChatModelGPT4o2024_11_20 ChatModel = "gpt-4o-2024-11-20"
ChatModelGPT4o2024_08_06 ChatModel = "gpt-4o-2024-08-06"
ChatModelGPT4o2024_05_13 ChatModel = "gpt-4o-2024-05-13"
ChatModelGPT4oAudioPreview ChatModel = "gpt-4o-audio-preview"
ChatModelGPT4oAudioPreview2024_10_01 ChatModel = "gpt-4o-audio-preview-2024-10-01"
ChatModelGPT4oAudioPreview2024_12_17 ChatModel = "gpt-4o-audio-preview-2024-12-17"
ChatModelGPT4oMiniAudioPreview ChatModel = "gpt-4o-mini-audio-preview"
ChatModelGPT4oMiniAudioPreview2024_12_17 ChatModel = "gpt-4o-mini-audio-preview-2024-12-17"
ChatModelChatgpt4oLatest ChatModel = "chatgpt-4o-latest"
ChatModelGPT4oMini ChatModel = "gpt-4o-mini"
ChatModelGPT4oMini2024_07_18 ChatModel = "gpt-4o-mini-2024-07-18"
ChatModelGPT4Turbo ChatModel = "gpt-4-turbo"
ChatModelGPT4Turbo2024_04_09 ChatModel = "gpt-4-turbo-2024-04-09"
ChatModelGPT4_0125Preview ChatModel = "gpt-4-0125-preview"
ChatModelGPT4TurboPreview ChatModel = "gpt-4-turbo-preview"
ChatModelGPT4_1106Preview ChatModel = "gpt-4-1106-preview"
ChatModelGPT4VisionPreview ChatModel = "gpt-4-vision-preview"
ChatModelGPT4 ChatModel = "gpt-4"
ChatModelGPT4_0314 ChatModel = "gpt-4-0314"
ChatModelGPT4_0613 ChatModel = "gpt-4-0613"
ChatModelGPT4_32k ChatModel = "gpt-4-32k"
ChatModelGPT4_32k0314 ChatModel = "gpt-4-32k-0314"
ChatModelGPT4_32k0613 ChatModel = "gpt-4-32k-0613"
ChatModelGPT3_5Turbo ChatModel = "gpt-3.5-turbo"
ChatModelGPT3_5Turbo16k ChatModel = "gpt-3.5-turbo-16k"
ChatModelGPT3_5Turbo0301 ChatModel = "gpt-3.5-turbo-0301"
ChatModelGPT3_5Turbo0613 ChatModel = "gpt-3.5-turbo-0613"
ChatModelGPT3_5Turbo1106 ChatModel = "gpt-3.5-turbo-1106"
ChatModelGPT3_5Turbo0125 ChatModel = "gpt-3.5-turbo-0125"
ChatModelGPT3_5Turbo16k0613 ChatModel = "gpt-3.5-turbo-16k-0613"
)
Loading

0 comments on commit a9e2f35

Please sign in to comment.