Skip to content

Commit

Permalink
feat(client): add realtime types (#1254)
Browse files Browse the repository at this point in the history
note this just defines types, there is no websocket interface
provided yet
  • Loading branch information
stainless-app[bot] committed Jan 9, 2025
1 parent bb6ac19 commit d373606
Show file tree
Hide file tree
Showing 8 changed files with 2,568 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .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-02200a58ed631064b6419711da99fefd6e97bdbbeb577a80a1a6e0c8dbcb18f5.yml
configured_endpoints: 69
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-b5b0e2c794b012919701c3fd43286af10fa25d33ceb8a881bec2636028f446e0.yml
60 changes: 60 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,66 @@ Methods:

# Beta

## Realtime

Types:

- <code><a href="./src/resources/beta/realtime/realtime.ts">ConversationCreatedEvent</a></code>
- <code><a href="./src/resources/beta/realtime/realtime.ts">ConversationItem</a></code>
- <code><a href="./src/resources/beta/realtime/realtime.ts">ConversationItemContent</a></code>
- <code><a href="./src/resources/beta/realtime/realtime.ts">ConversationItemCreateEvent</a></code>
- <code><a href="./src/resources/beta/realtime/realtime.ts">ConversationItemCreatedEvent</a></code>
- <code><a href="./src/resources/beta/realtime/realtime.ts">ConversationItemDeleteEvent</a></code>
- <code><a href="./src/resources/beta/realtime/realtime.ts">ConversationItemDeletedEvent</a></code>
- <code><a href="./src/resources/beta/realtime/realtime.ts">ConversationItemInputAudioTranscriptionCompletedEvent</a></code>
- <code><a href="./src/resources/beta/realtime/realtime.ts">ConversationItemInputAudioTranscriptionFailedEvent</a></code>
- <code><a href="./src/resources/beta/realtime/realtime.ts">ConversationItemTruncateEvent</a></code>
- <code><a href="./src/resources/beta/realtime/realtime.ts">ConversationItemTruncatedEvent</a></code>
- <code><a href="./src/resources/beta/realtime/realtime.ts">ErrorEvent</a></code>
- <code><a href="./src/resources/beta/realtime/realtime.ts">InputAudioBufferAppendEvent</a></code>
- <code><a href="./src/resources/beta/realtime/realtime.ts">InputAudioBufferClearEvent</a></code>
- <code><a href="./src/resources/beta/realtime/realtime.ts">InputAudioBufferClearedEvent</a></code>
- <code><a href="./src/resources/beta/realtime/realtime.ts">InputAudioBufferCommitEvent</a></code>
- <code><a href="./src/resources/beta/realtime/realtime.ts">InputAudioBufferCommittedEvent</a></code>
- <code><a href="./src/resources/beta/realtime/realtime.ts">InputAudioBufferSpeechStartedEvent</a></code>
- <code><a href="./src/resources/beta/realtime/realtime.ts">InputAudioBufferSpeechStoppedEvent</a></code>
- <code><a href="./src/resources/beta/realtime/realtime.ts">RateLimitsUpdatedEvent</a></code>
- <code><a href="./src/resources/beta/realtime/realtime.ts">RealtimeClientEvent</a></code>
- <code><a href="./src/resources/beta/realtime/realtime.ts">RealtimeResponse</a></code>
- <code><a href="./src/resources/beta/realtime/realtime.ts">RealtimeResponseStatus</a></code>
- <code><a href="./src/resources/beta/realtime/realtime.ts">RealtimeResponseUsage</a></code>
- <code><a href="./src/resources/beta/realtime/realtime.ts">RealtimeServerEvent</a></code>
- <code><a href="./src/resources/beta/realtime/realtime.ts">ResponseAudioDeltaEvent</a></code>
- <code><a href="./src/resources/beta/realtime/realtime.ts">ResponseAudioDoneEvent</a></code>
- <code><a href="./src/resources/beta/realtime/realtime.ts">ResponseAudioTranscriptDeltaEvent</a></code>
- <code><a href="./src/resources/beta/realtime/realtime.ts">ResponseAudioTranscriptDoneEvent</a></code>
- <code><a href="./src/resources/beta/realtime/realtime.ts">ResponseCancelEvent</a></code>
- <code><a href="./src/resources/beta/realtime/realtime.ts">ResponseContentPartAddedEvent</a></code>
- <code><a href="./src/resources/beta/realtime/realtime.ts">ResponseContentPartDoneEvent</a></code>
- <code><a href="./src/resources/beta/realtime/realtime.ts">ResponseCreateEvent</a></code>
- <code><a href="./src/resources/beta/realtime/realtime.ts">ResponseCreatedEvent</a></code>
- <code><a href="./src/resources/beta/realtime/realtime.ts">ResponseDoneEvent</a></code>
- <code><a href="./src/resources/beta/realtime/realtime.ts">ResponseFunctionCallArgumentsDeltaEvent</a></code>
- <code><a href="./src/resources/beta/realtime/realtime.ts">ResponseFunctionCallArgumentsDoneEvent</a></code>
- <code><a href="./src/resources/beta/realtime/realtime.ts">ResponseOutputItemAddedEvent</a></code>
- <code><a href="./src/resources/beta/realtime/realtime.ts">ResponseOutputItemDoneEvent</a></code>
- <code><a href="./src/resources/beta/realtime/realtime.ts">ResponseTextDeltaEvent</a></code>
- <code><a href="./src/resources/beta/realtime/realtime.ts">ResponseTextDoneEvent</a></code>
- <code><a href="./src/resources/beta/realtime/realtime.ts">SessionCreatedEvent</a></code>
- <code><a href="./src/resources/beta/realtime/realtime.ts">SessionUpdateEvent</a></code>
- <code><a href="./src/resources/beta/realtime/realtime.ts">SessionUpdatedEvent</a></code>

### Sessions

Types:

- <code><a href="./src/resources/beta/realtime/sessions.ts">Session</a></code>
- <code><a href="./src/resources/beta/realtime/sessions.ts">SessionCreateResponse</a></code>

Methods:

- <code title="post /realtime/sessions">client.beta.realtime.sessions.<a href="./src/resources/beta/realtime/sessions.ts">create</a>({ ...params }) -> SessionCreateResponse</code>

## VectorStores

Types:
Expand Down
6 changes: 6 additions & 0 deletions src/resources/beta/beta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import {
RunStreamEvent,
ThreadStreamEvent,
} from './assistants';
import * as RealtimeAPI from './realtime/realtime';
import { Realtime } from './realtime/realtime';
import * as ThreadsAPI from './threads/threads';
import {
AssistantResponseFormatOption,
Expand Down Expand Up @@ -58,19 +60,23 @@ import {
import { Chat } from './chat/chat';

export class Beta extends APIResource {
realtime: RealtimeAPI.Realtime = new RealtimeAPI.Realtime(this._client);
vectorStores: VectorStoresAPI.VectorStores = new VectorStoresAPI.VectorStores(this._client);
chat: ChatAPI.Chat = new ChatAPI.Chat(this._client);
assistants: AssistantsAPI.Assistants = new AssistantsAPI.Assistants(this._client);
threads: ThreadsAPI.Threads = new ThreadsAPI.Threads(this._client);
}

Beta.Realtime = Realtime;
Beta.VectorStores = VectorStores;
Beta.VectorStoresPage = VectorStoresPage;
Beta.Assistants = Assistants;
Beta.AssistantsPage = AssistantsPage;
Beta.Threads = Threads;

export declare namespace Beta {
export { Realtime as Realtime };

export {
VectorStores as VectorStores,
type AutoFileChunkingStrategyParam as AutoFileChunkingStrategyParam,
Expand Down
1 change: 1 addition & 0 deletions src/resources/beta/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export {
type AssistantListParams,
} from './assistants';
export { Beta } from './beta';
export { Realtime } from './realtime/index';
export { Chat } from './chat/index';
export {
Threads,
Expand Down
4 changes: 4 additions & 0 deletions src/resources/beta/realtime/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

export { Realtime } from './realtime';
export { Sessions, type Session, type SessionCreateResponse, type SessionCreateParams } from './sessions';
Loading

0 comments on commit d373606

Please sign in to comment.