Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request Type #190

Merged
merged 1 commit into from
Mar 6, 2025
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
24 changes: 18 additions & 6 deletions src/apis/audio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ export class Audio extends ApiResource {

export class transcriptions extends ApiResource {
async create(
_body: TranscriptionCreateParams,
_body: TranscriptionCreateBody,
params?: ApiClientInterface,
opts?: RequestOptions
): Promise<any> {
const body: TranscriptionCreateParams = _body;
const body: TranscriptionCreateBody = _body;
if (params) {
const config = overrideConfig(this.client.config, params.config);
this.client.customHeaders = {
Expand All @@ -44,11 +44,11 @@ export class transcriptions extends ApiResource {

export class translations extends ApiResource {
async create(
_body: TranslationCreateParams,
_body: TranslationCreateBody,
params?: ApiClientInterface,
opts?: RequestOptions
): Promise<any> {
const body: TranslationCreateParams = _body;
const body: TranslationCreateBody = _body;
if (params) {
const config = overrideConfig(this.client.config, params.config);
this.client.customHeaders = {
Expand All @@ -66,11 +66,11 @@ export class translations extends ApiResource {

export class speech extends ApiResource {
async create(
_body: SpeechCreateParams,
_body: SpeechCreateBody,
params?: ApiClientInterface,
opts?: RequestOptions
): Promise<any> {
const body: SpeechCreateParams = _body;
const body: SpeechCreateBody = _body;
if (params) {
const config = overrideConfig(this.client.config, params.config);
this.client.customHeaders = {
Expand All @@ -83,3 +83,15 @@ export class speech extends ApiResource {
return response;
}
}

export interface TranscriptionCreateBody extends TranscriptionCreateParams {
[key: string]: any;
}

export interface TranslationCreateBody extends TranslationCreateParams {
[key: string]: any;
}

export interface SpeechCreateBody extends SpeechCreateParams {
[key: string]: any;
}
8 changes: 6 additions & 2 deletions src/apis/batches.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import { createHeaders } from './createHeaders';

export class Batches extends ApiResource {
async create(
_body: BatchCreateParams,
_body: BatchCreateBody,
params?: ApiClientInterface,
opts?: RequestOptions
): Promise<any> {
const body: BatchCreateParams = _body;
const body: BatchCreateBody = _body;
if (params) {
const config = overrideConfig(this.client.config, params.config);
this.client.customHeaders = {
Expand Down Expand Up @@ -106,3 +106,7 @@ export class Batches extends ApiResource {
return response;
}
}

export interface BatchCreateBody extends BatchCreateParams {
[key: string]: any;
}
13 changes: 11 additions & 2 deletions src/apis/fineTuning.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ export class Jobs extends ApiResource {
}

async create(
_body: JobCreateParams,
_body: JobCreateBody,
params?: ApiClientInterface,
opts?: RequestOptions
): Promise<any> {
const body: JobCreateParams = _body;
const body: JobCreateBody = _body;
if (params) {
const config = overrideConfig(this.client.config, params.config);
this.client.customHeaders = {
Expand Down Expand Up @@ -161,3 +161,12 @@ export class Checkpoints extends ApiResource {
return finalResponse(result);
}
}

export interface JobCreateBody extends JobCreateParams {
role_arn: string;
job_name: string;
output_file: string;
provider_options: Record<string, any>;
portkey_options: Record<string, any>;
[key: string]: any;
}
8 changes: 6 additions & 2 deletions src/apis/realtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ export class Realtime extends ApiResource {

export class Sessions extends ApiResource {
async create(
_body: SessionCreateParams,
_body: SessionCreateBody,
params?: ApiClientInterface,
opts?: RequestOptions
): Promise<any> {
const body: SessionCreateParams = _body;
const body: SessionCreateBody = _body;
if (params) {
const config = overrideConfig(this.client.config, params.config);
this.client.customHeaders = {
Expand All @@ -36,3 +36,7 @@ export class Sessions extends ApiResource {
return finalResponse(result);
}
}

export interface SessionCreateBody extends SessionCreateParams {
[key: string]: any;
}