Skip to content

Commit

Permalink
edits
Browse files Browse the repository at this point in the history
  • Loading branch information
deyaaeldeen committed Sep 17, 2024
1 parent bf8ecdf commit 2bb1742
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion sdk/openai/openai-assistants/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"test:browser": "npm run clean && npm run build && npm run integration-test:browser",
"test:node": "npm run clean && tsc -p . && npm run integration-test:node",
"test": "npm run clean && tsc -p . && npm run unit-test:node && dev-tool run bundle && npm run unit-test:browser && npm run integration-test",
"unit-test:browser": "dev-tool run test:browser -- karma.conf.cjs",
"unit-test:browser": "echo skipped",
"unit-test:node": "dev-tool run test:node-ts-input",
"unit-test": "npm run unit-test:node && npm run unit-test:browser"
},
Expand Down
4 changes: 2 additions & 2 deletions sdk/openai/openai/src/OpenAIClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export class OpenAIClient {
inputOptions?: GetAudioTranslationOptions,
): Promise<AudioResult<Format>> {
const options =
inputOptions ?? (typeof formatOrOptions === "string" ? {} : formatOrOptions ?? {});
inputOptions ?? (typeof formatOrOptions === "string" ? {} : (formatOrOptions ?? {}));
const response_format = typeof formatOrOptions === "string" ? formatOrOptions : undefined;
this.setModel(deploymentName, options);
if (response_format === undefined) {
Expand Down Expand Up @@ -237,7 +237,7 @@ export class OpenAIClient {
inputOptions?: GetAudioTranscriptionOptions,
): Promise<AudioResult<Format>> {
const options =
inputOptions ?? (typeof formatOrOptions === "string" ? {} : formatOrOptions ?? {});
inputOptions ?? (typeof formatOrOptions === "string" ? {} : (formatOrOptions ?? {}));
const response_format = typeof formatOrOptions === "string" ? formatOrOptions : undefined;
this.setModel(deploymentName, options);
if (response_format === undefined) {
Expand Down
4 changes: 2 additions & 2 deletions sdk/openai/openai/src/api/operations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export async function getAudioTranscription<Format extends AudioResultFormat>(
inputOptions?: GetAudioTranscriptionOptions,
): Promise<AudioResult<Format>> {
const options =
inputOptions ?? (typeof formatOrOptions === "string" ? {} : formatOrOptions ?? {});
inputOptions ?? (typeof formatOrOptions === "string" ? {} : (formatOrOptions ?? {}));
const response_format = typeof formatOrOptions === "string" ? formatOrOptions : undefined;
const { abortSignal, onResponse, requestOptions, tracingOptions, ...rest } = options;
const { body, status } = await context
Expand Down Expand Up @@ -166,7 +166,7 @@ export async function getAudioTranslation<Format extends AudioResultFormat>(
inputOptions?: GetAudioTranslationOptions,
): Promise<AudioResult<Format>> {
const options =
inputOptions ?? (typeof formatOrOptions === "string" ? {} : formatOrOptions ?? {});
inputOptions ?? (typeof formatOrOptions === "string" ? {} : (formatOrOptions ?? {}));
const response_format = typeof formatOrOptions === "string" ? formatOrOptions : undefined;
const { abortSignal, onResponse, requestOptions, tracingOptions, ...rest } = options;
const { body, status } = await context
Expand Down

0 comments on commit 2bb1742

Please sign in to comment.