Skip to content

Commit

Permalink
feat(api): add gpt-4o model (#1417)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-bot committed May 13, 2024
1 parent c0afbc7 commit ac6c900
Show file tree
Hide file tree
Showing 8 changed files with 89 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 64
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-084b8f68408c6b689a55200a78bcf233769bfcd8e999d9fadaeb399152b05bcd.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-47007cc1aa5bc7b74107a99b377925978a0bd376ed67bdae724e80d5d0b63d57.yml
4 changes: 4 additions & 0 deletions src/openai/resources/beta/assistants.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ def create(
model: Union[
str,
Literal[
"gpt-4o",
"gpt-4o-2024-05-13",
"gpt-4-turbo",
"gpt-4-turbo-2024-04-09",
"gpt-4-0125-preview",
Expand Down Expand Up @@ -434,6 +436,8 @@ async def create(
model: Union[
str,
Literal[
"gpt-4o",
"gpt-4o-2024-05-13",
"gpt-4-turbo",
"gpt-4-turbo-2024-04-09",
"gpt-4-0125-preview",
Expand Down
44 changes: 44 additions & 0 deletions src/openai/resources/beta/threads/runs/runs.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ def create(
model: Union[
str,
Literal[
"gpt-4o",
"gpt-4o-2024-05-13",
"gpt-4-turbo",
"gpt-4-turbo-2024-04-09",
"gpt-4-0125-preview",
Expand Down Expand Up @@ -230,6 +232,8 @@ def create(
model: Union[
str,
Literal[
"gpt-4o",
"gpt-4o-2024-05-13",
"gpt-4-turbo",
"gpt-4-turbo-2024-04-09",
"gpt-4-0125-preview",
Expand Down Expand Up @@ -374,6 +378,8 @@ def create(
model: Union[
str,
Literal[
"gpt-4o",
"gpt-4o-2024-05-13",
"gpt-4-turbo",
"gpt-4-turbo-2024-04-09",
"gpt-4-0125-preview",
Expand Down Expand Up @@ -517,6 +523,8 @@ def create(
model: Union[
str,
Literal[
"gpt-4o",
"gpt-4o-2024-05-13",
"gpt-4-turbo",
"gpt-4-turbo-2024-04-09",
"gpt-4-0125-preview",
Expand Down Expand Up @@ -784,6 +792,8 @@ def create_and_poll(
model: Union[
str,
Literal[
"gpt-4o",
"gpt-4o-2024-05-13",
"gpt-4-turbo",
"gpt-4-turbo-2024-04-09",
"gpt-4-0125-preview",
Expand Down Expand Up @@ -874,6 +884,8 @@ def create_and_stream(
model: Union[
str,
Literal[
"gpt-4o",
"gpt-4o-2024-05-13",
"gpt-4-turbo",
"gpt-4-turbo-2024-04-09",
"gpt-4-0125-preview",
Expand Down Expand Up @@ -928,6 +940,8 @@ def create_and_stream(
model: Union[
str,
Literal[
"gpt-4o",
"gpt-4o-2024-05-13",
"gpt-4-turbo",
"gpt-4-turbo-2024-04-09",
"gpt-4-0125-preview",
Expand Down Expand Up @@ -982,6 +996,8 @@ def create_and_stream(
model: Union[
str,
Literal[
"gpt-4o",
"gpt-4o-2024-05-13",
"gpt-4-turbo",
"gpt-4-turbo-2024-04-09",
"gpt-4-0125-preview",
Expand Down Expand Up @@ -1120,6 +1136,8 @@ def stream(
model: Union[
str,
Literal[
"gpt-4o",
"gpt-4o-2024-05-13",
"gpt-4-turbo",
"gpt-4-turbo-2024-04-09",
"gpt-4-0125-preview",
Expand Down Expand Up @@ -1173,6 +1191,8 @@ def stream(
model: Union[
str,
Literal[
"gpt-4o",
"gpt-4o-2024-05-13",
"gpt-4-turbo",
"gpt-4-turbo-2024-04-09",
"gpt-4-0125-preview",
Expand Down Expand Up @@ -1226,6 +1246,8 @@ def stream(
model: Union[
str,
Literal[
"gpt-4o",
"gpt-4o-2024-05-13",
"gpt-4-turbo",
"gpt-4-turbo-2024-04-09",
"gpt-4-0125-preview",
Expand Down Expand Up @@ -1617,6 +1639,8 @@ async def create(
model: Union[
str,
Literal[
"gpt-4o",
"gpt-4o-2024-05-13",
"gpt-4-turbo",
"gpt-4-turbo-2024-04-09",
"gpt-4-0125-preview",
Expand Down Expand Up @@ -1762,6 +1786,8 @@ async def create(
model: Union[
str,
Literal[
"gpt-4o",
"gpt-4o-2024-05-13",
"gpt-4-turbo",
"gpt-4-turbo-2024-04-09",
"gpt-4-0125-preview",
Expand Down Expand Up @@ -1906,6 +1932,8 @@ async def create(
model: Union[
str,
Literal[
"gpt-4o",
"gpt-4o-2024-05-13",
"gpt-4-turbo",
"gpt-4-turbo-2024-04-09",
"gpt-4-0125-preview",
Expand Down Expand Up @@ -2049,6 +2077,8 @@ async def create(
model: Union[
str,
Literal[
"gpt-4o",
"gpt-4o-2024-05-13",
"gpt-4-turbo",
"gpt-4-turbo-2024-04-09",
"gpt-4-0125-preview",
Expand Down Expand Up @@ -2316,6 +2346,8 @@ async def create_and_poll(
model: Union[
str,
Literal[
"gpt-4o",
"gpt-4o-2024-05-13",
"gpt-4-turbo",
"gpt-4-turbo-2024-04-09",
"gpt-4-0125-preview",
Expand Down Expand Up @@ -2406,6 +2438,8 @@ def create_and_stream(
model: Union[
str,
Literal[
"gpt-4o",
"gpt-4o-2024-05-13",
"gpt-4-turbo",
"gpt-4-turbo-2024-04-09",
"gpt-4-0125-preview",
Expand Down Expand Up @@ -2460,6 +2494,8 @@ def create_and_stream(
model: Union[
str,
Literal[
"gpt-4o",
"gpt-4o-2024-05-13",
"gpt-4-turbo",
"gpt-4-turbo-2024-04-09",
"gpt-4-0125-preview",
Expand Down Expand Up @@ -2514,6 +2550,8 @@ def create_and_stream(
model: Union[
str,
Literal[
"gpt-4o",
"gpt-4o-2024-05-13",
"gpt-4-turbo",
"gpt-4-turbo-2024-04-09",
"gpt-4-0125-preview",
Expand Down Expand Up @@ -2654,6 +2692,8 @@ def stream(
model: Union[
str,
Literal[
"gpt-4o",
"gpt-4o-2024-05-13",
"gpt-4-turbo",
"gpt-4-turbo-2024-04-09",
"gpt-4-0125-preview",
Expand Down Expand Up @@ -2707,6 +2747,8 @@ def stream(
model: Union[
str,
Literal[
"gpt-4o",
"gpt-4o-2024-05-13",
"gpt-4-turbo",
"gpt-4-turbo-2024-04-09",
"gpt-4-0125-preview",
Expand Down Expand Up @@ -2760,6 +2802,8 @@ def stream(
model: Union[
str,
Literal[
"gpt-4o",
"gpt-4o-2024-05-13",
"gpt-4-turbo",
"gpt-4-turbo-2024-04-09",
"gpt-4-0125-preview",
Expand Down
32 changes: 32 additions & 0 deletions src/openai/resources/beta/threads/threads.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,8 @@ def create_and_run(
model: Union[
str,
Literal[
"gpt-4o",
"gpt-4o-2024-05-13",
"gpt-4-turbo",
"gpt-4-turbo-2024-04-09",
"gpt-4-0125-preview",
Expand Down Expand Up @@ -411,6 +413,8 @@ def create_and_run(
model: Union[
str,
Literal[
"gpt-4o",
"gpt-4o-2024-05-13",
"gpt-4-turbo",
"gpt-4-turbo-2024-04-09",
"gpt-4-0125-preview",
Expand Down Expand Up @@ -554,6 +558,8 @@ def create_and_run(
model: Union[
str,
Literal[
"gpt-4o",
"gpt-4o-2024-05-13",
"gpt-4-turbo",
"gpt-4-turbo-2024-04-09",
"gpt-4-0125-preview",
Expand Down Expand Up @@ -696,6 +702,8 @@ def create_and_run(
model: Union[
str,
Literal[
"gpt-4o",
"gpt-4o-2024-05-13",
"gpt-4-turbo",
"gpt-4-turbo-2024-04-09",
"gpt-4-0125-preview",
Expand Down Expand Up @@ -776,6 +784,8 @@ def create_and_run_poll(
model: Union[
str,
Literal[
"gpt-4o",
"gpt-4o-2024-05-13",
"gpt-4-turbo",
"gpt-4-turbo-2024-04-09",
"gpt-4-0125-preview",
Expand Down Expand Up @@ -854,6 +864,8 @@ def create_and_run_stream(
model: Union[
str,
Literal[
"gpt-4o",
"gpt-4o-2024-05-13",
"gpt-4-turbo",
"gpt-4-turbo-2024-04-09",
"gpt-4-0125-preview",
Expand Down Expand Up @@ -906,6 +918,8 @@ def create_and_run_stream(
model: Union[
str,
Literal[
"gpt-4o",
"gpt-4o-2024-05-13",
"gpt-4-turbo",
"gpt-4-turbo-2024-04-09",
"gpt-4-0125-preview",
Expand Down Expand Up @@ -958,6 +972,8 @@ def create_and_run_stream(
model: Union[
str,
Literal[
"gpt-4o",
"gpt-4o-2024-05-13",
"gpt-4-turbo",
"gpt-4-turbo-2024-04-09",
"gpt-4-0125-preview",
Expand Down Expand Up @@ -1241,6 +1257,8 @@ async def create_and_run(
model: Union[
str,
Literal[
"gpt-4o",
"gpt-4o-2024-05-13",
"gpt-4-turbo",
"gpt-4-turbo-2024-04-09",
"gpt-4-0125-preview",
Expand Down Expand Up @@ -1385,6 +1403,8 @@ async def create_and_run(
model: Union[
str,
Literal[
"gpt-4o",
"gpt-4o-2024-05-13",
"gpt-4-turbo",
"gpt-4-turbo-2024-04-09",
"gpt-4-0125-preview",
Expand Down Expand Up @@ -1528,6 +1548,8 @@ async def create_and_run(
model: Union[
str,
Literal[
"gpt-4o",
"gpt-4o-2024-05-13",
"gpt-4-turbo",
"gpt-4-turbo-2024-04-09",
"gpt-4-0125-preview",
Expand Down Expand Up @@ -1670,6 +1692,8 @@ async def create_and_run(
model: Union[
str,
Literal[
"gpt-4o",
"gpt-4o-2024-05-13",
"gpt-4-turbo",
"gpt-4-turbo-2024-04-09",
"gpt-4-0125-preview",
Expand Down Expand Up @@ -1750,6 +1774,8 @@ async def create_and_run_poll(
model: Union[
str,
Literal[
"gpt-4o",
"gpt-4o-2024-05-13",
"gpt-4-turbo",
"gpt-4-turbo-2024-04-09",
"gpt-4-0125-preview",
Expand Down Expand Up @@ -1830,6 +1856,8 @@ def create_and_run_stream(
model: Union[
str,
Literal[
"gpt-4o",
"gpt-4o-2024-05-13",
"gpt-4-turbo",
"gpt-4-turbo-2024-04-09",
"gpt-4-0125-preview",
Expand Down Expand Up @@ -1882,6 +1910,8 @@ def create_and_run_stream(
model: Union[
str,
Literal[
"gpt-4o",
"gpt-4o-2024-05-13",
"gpt-4-turbo",
"gpt-4-turbo-2024-04-09",
"gpt-4-0125-preview",
Expand Down Expand Up @@ -1934,6 +1964,8 @@ def create_and_run_stream(
model: Union[
str,
Literal[
"gpt-4o",
"gpt-4o-2024-05-13",
"gpt-4-turbo",
"gpt-4-turbo-2024-04-09",
"gpt-4-0125-preview",
Expand Down
2 changes: 2 additions & 0 deletions src/openai/types/beta/assistant_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ class AssistantCreateParams(TypedDict, total=False):
Union[
str,
Literal[
"gpt-4o",
"gpt-4o-2024-05-13",
"gpt-4-turbo",
"gpt-4-turbo-2024-04-09",
"gpt-4-0125-preview",
Expand Down
2 changes: 2 additions & 0 deletions src/openai/types/beta/thread_create_and_run_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ class ThreadCreateAndRunParamsBase(TypedDict, total=False):
model: Union[
str,
Literal[
"gpt-4o",
"gpt-4o-2024-05-13",
"gpt-4-turbo",
"gpt-4-turbo-2024-04-09",
"gpt-4-0125-preview",
Expand Down
2 changes: 2 additions & 0 deletions src/openai/types/beta/threads/run_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ class RunCreateParamsBase(TypedDict, total=False):
model: Union[
str,
Literal[
"gpt-4o",
"gpt-4o-2024-05-13",
"gpt-4-turbo",
"gpt-4-turbo-2024-04-09",
"gpt-4-0125-preview",
Expand Down
2 changes: 2 additions & 0 deletions src/openai/types/chat_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
__all__ = ["ChatModel"]

ChatModel = Literal[
"gpt-4o",
"gpt-4o-2024-05-13",
"gpt-4-turbo",
"gpt-4-turbo-2024-04-09",
"gpt-4-0125-preview",
Expand Down

0 comments on commit ac6c900

Please sign in to comment.