-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(api): new o1 and GPT-4o models + preference fine-tuning (#1956)
learn more here: https://platform.openai.com/docs/changelog
- Loading branch information
1 parent
bce8998
commit b3143fd
Showing
25 changed files
with
1,471 additions
and
147 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
configured_endpoints: 68 | ||
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-2e0e0678be19d1118fd796af291822075e40538dba326611e177e9f3dc245a53.yml | ||
configured_endpoints: 69 | ||
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-779ea2754025daf5e18eb8ceb203ec321692636bc3a999338556a479178efa6c.yml |
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
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,33 @@ | ||
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
|
||
from .realtime import ( | ||
Realtime, | ||
AsyncRealtime, | ||
RealtimeWithRawResponse, | ||
AsyncRealtimeWithRawResponse, | ||
RealtimeWithStreamingResponse, | ||
AsyncRealtimeWithStreamingResponse, | ||
) | ||
from .sessions import ( | ||
Sessions, | ||
AsyncSessions, | ||
SessionsWithRawResponse, | ||
AsyncSessionsWithRawResponse, | ||
SessionsWithStreamingResponse, | ||
AsyncSessionsWithStreamingResponse, | ||
) | ||
|
||
__all__ = [ | ||
"Sessions", | ||
"AsyncSessions", | ||
"SessionsWithRawResponse", | ||
"AsyncSessionsWithRawResponse", | ||
"SessionsWithStreamingResponse", | ||
"AsyncSessionsWithStreamingResponse", | ||
"Realtime", | ||
"AsyncRealtime", | ||
"RealtimeWithRawResponse", | ||
"AsyncRealtimeWithRawResponse", | ||
"RealtimeWithStreamingResponse", | ||
"AsyncRealtimeWithStreamingResponse", | ||
] |
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,102 @@ | ||
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. | ||
|
||
from __future__ import annotations | ||
|
||
from .sessions import ( | ||
Sessions, | ||
AsyncSessions, | ||
SessionsWithRawResponse, | ||
AsyncSessionsWithRawResponse, | ||
SessionsWithStreamingResponse, | ||
AsyncSessionsWithStreamingResponse, | ||
) | ||
from ...._compat import cached_property | ||
from ...._resource import SyncAPIResource, AsyncAPIResource | ||
|
||
__all__ = ["Realtime", "AsyncRealtime"] | ||
|
||
|
||
class Realtime(SyncAPIResource): | ||
@cached_property | ||
def sessions(self) -> Sessions: | ||
return Sessions(self._client) | ||
|
||
@cached_property | ||
def with_raw_response(self) -> RealtimeWithRawResponse: | ||
""" | ||
This property can be used as a prefix for any HTTP method call to return the | ||
the raw response object instead of the parsed content. | ||
For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers | ||
""" | ||
return RealtimeWithRawResponse(self) | ||
|
||
@cached_property | ||
def with_streaming_response(self) -> RealtimeWithStreamingResponse: | ||
""" | ||
An alternative to `.with_raw_response` that doesn't eagerly read the response body. | ||
For more information, see https://www.github.com/openai/openai-python#with_streaming_response | ||
""" | ||
return RealtimeWithStreamingResponse(self) | ||
|
||
|
||
class AsyncRealtime(AsyncAPIResource): | ||
@cached_property | ||
def sessions(self) -> AsyncSessions: | ||
return AsyncSessions(self._client) | ||
|
||
@cached_property | ||
def with_raw_response(self) -> AsyncRealtimeWithRawResponse: | ||
""" | ||
This property can be used as a prefix for any HTTP method call to return the | ||
the raw response object instead of the parsed content. | ||
For more information, see https://www.github.com/openai/openai-python#accessing-raw-response-data-eg-headers | ||
""" | ||
return AsyncRealtimeWithRawResponse(self) | ||
|
||
@cached_property | ||
def with_streaming_response(self) -> AsyncRealtimeWithStreamingResponse: | ||
""" | ||
An alternative to `.with_raw_response` that doesn't eagerly read the response body. | ||
For more information, see https://www.github.com/openai/openai-python#with_streaming_response | ||
""" | ||
return AsyncRealtimeWithStreamingResponse(self) | ||
|
||
|
||
class RealtimeWithRawResponse: | ||
def __init__(self, realtime: Realtime) -> None: | ||
self._realtime = realtime | ||
|
||
@cached_property | ||
def sessions(self) -> SessionsWithRawResponse: | ||
return SessionsWithRawResponse(self._realtime.sessions) | ||
|
||
|
||
class AsyncRealtimeWithRawResponse: | ||
def __init__(self, realtime: AsyncRealtime) -> None: | ||
self._realtime = realtime | ||
|
||
@cached_property | ||
def sessions(self) -> AsyncSessionsWithRawResponse: | ||
return AsyncSessionsWithRawResponse(self._realtime.sessions) | ||
|
||
|
||
class RealtimeWithStreamingResponse: | ||
def __init__(self, realtime: Realtime) -> None: | ||
self._realtime = realtime | ||
|
||
@cached_property | ||
def sessions(self) -> SessionsWithStreamingResponse: | ||
return SessionsWithStreamingResponse(self._realtime.sessions) | ||
|
||
|
||
class AsyncRealtimeWithStreamingResponse: | ||
def __init__(self, realtime: AsyncRealtime) -> None: | ||
self._realtime = realtime | ||
|
||
@cached_property | ||
def sessions(self) -> AsyncSessionsWithStreamingResponse: | ||
return AsyncSessionsWithStreamingResponse(self._realtime.sessions) |
Oops, something went wrong.