Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion __tests__/call.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ describe('call API', () => {
session: '<session id>',
}),
).rejects.toThrowError(
`Stream error code 16: GetCallStats failed with error: "call report not found for cid:default:${callId} session_id:<session id>"`,
`Stream error code 16: GetCallStats failed with error: "call session not found"`,
);
});

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"@openapitools/openapi-generator-cli": "^2.7.0",
"@rollup/plugin-replace": "^5.0.2",
"@rollup/plugin-typescript": "^11.1.4",
"@stream-io/openai-realtime-api": "~0.1.0",
"@stream-io/openai-realtime-api": "~0.1.3",
"@types/uuid": "^9.0.4",
"@typescript-eslint/eslint-plugin": "^6.4.0",
"dotenv": "^16.3.1",
Expand All @@ -76,7 +76,7 @@
"uuid": "^9.0.1"
},
"peerDependencies": {
"@stream-io/openai-realtime-api": "~0.1.0"
"@stream-io/openai-realtime-api": "~0.1.3"
},
"peerDependenciesMeta": {
"@stream-io/openai-realtime-api": {
Expand Down
7 changes: 5 additions & 2 deletions src/StreamVideoClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ import { StreamCall } from './StreamCall';
import type { StreamClient } from './StreamClient';
import type { ApiConfig } from './types';
import type {
RealtimeClient,
createRealtimeClient,
RealtimeAPIModel,
RealtimeClient,
} from '@stream-io/openai-realtime-api';

export class StreamVideoClient extends VideoApi {
Expand All @@ -26,7 +27,8 @@ export class StreamVideoClient extends VideoApi {
call: StreamCall;
agentUserId: string;
openAiApiKey: string;
validityInSeconds: number;
model?: RealtimeAPIModel;
validityInSeconds?: number;
}): Promise<RealtimeClient> => {
let doCreateRealtimeClient: typeof createRealtimeClient;

Expand Down Expand Up @@ -55,6 +57,7 @@ export class StreamVideoClient extends VideoApi {
streamApiKey: this.apiConfig.apiKey,
streamUserToken: token,
openAiApiKey: options.openAiApiKey,
model: options.model,
});

await realtimeClient.connect();
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -488,10 +488,10 @@
resolved "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz"
integrity sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==

"@stream-io/openai-realtime-api@~0.1.0":
version "0.1.0"
resolved "https://registry.yarnpkg.com/@stream-io/openai-realtime-api/-/openai-realtime-api-0.1.0.tgz#d14db921e96dbbb5e3a71c566f920f8040ca5b55"
integrity sha512-oT6lvxH0rl+lwQLSLFz3UJRFjh/JoqbpE6GCDvOf8Jw05wmslPhrozSqdt8VkCUap+fkPI8LUPfRCWc+HgJp9Q==
"@stream-io/openai-realtime-api@~0.1.3":
version "0.1.3"
resolved "https://registry.yarnpkg.com/@stream-io/openai-realtime-api/-/openai-realtime-api-0.1.3.tgz#4a77eac5e58b4d7980958820690687a0edf3986d"
integrity sha512-kB3BMW2CYAHF+SrswUvaJmwVlOOK3MZYBW9oR4Q9HGpzS0gEGP/feGsqt5M37/0gJ6A5mOoBA26TcnHmaA39dA==
dependencies:
"@openai/realtime-api-beta" openai/openai-realtime-api-beta#a5cb94824f625423858ebacb9f769226ca98945f
ws "^8.18.0"
Expand Down