diff --git a/src/apis/assistants.ts b/src/apis/assistants.ts index fff05e7..ccbf610 100644 --- a/src/apis/assistants.ts +++ b/src/apis/assistants.ts @@ -22,7 +22,7 @@ export interface FileCreateParams { export interface FileListParams extends CursorPageParams { before?: string; - order?: 'asc' | 'desc'; + order?: string; } export interface CursorPageParams { @@ -32,7 +32,7 @@ export interface CursorPageParams { export interface AssistantListParams extends CursorPageParams { before?: string; - order?: 'asc' | 'desc'; + order?: string; } export interface AssistantUpdateParams { @@ -99,7 +99,7 @@ export class Assistants extends ApiResource { baseURL: this.client.baseURL, defaultHeaders: {...this.client.customHeaders, ...this.client.portkeyHeaders}, }); - + // @ts-ignore const result = await OAIclient.beta.assistants.list(query, opts).withResponse(); return finalResponse(result); @@ -230,7 +230,7 @@ export class Files extends ApiResource{ baseURL: this.client.baseURL, defaultHeaders: {...this.client.customHeaders, ...this.client.portkeyHeaders}, }); - + // @ts-ignore const result = await OAIclient.beta.assistants.files.list(assistantId, query, opts).withResponse(); return finalResponse(result); diff --git a/src/apis/files.ts b/src/apis/files.ts index 530b7d7..633a2d9 100644 --- a/src/apis/files.ts +++ b/src/apis/files.ts @@ -27,7 +27,8 @@ export class MainFiles extends ApiResource { baseURL: this.client.baseURL, defaultHeaders: {...this.client.customHeaders, ...this.client.portkeyHeaders}, }); - + + // @ts-ignore const result = await OAIclient.files.create(body, opts).withResponse(); return finalResponse(result); @@ -135,17 +136,17 @@ export class MainFiles extends ApiResource { export interface FileCreateParams { file: any; - purpose: 'fine-tune' | 'assistants'; + purpose?: string; } export interface FileObject { id: string; - bytes: number; - created_at: number; - filename: string; - object: 'file'; - purpose: 'fine-tune' | 'fine-tune-results' | 'assistants' | 'assistants_output'; - status: 'uploaded' | 'processed' | 'error'; + bytes?: number; + created_at?: number; + filename?: string; + object?: string; + purpose?: string; + status?: string; status_details?: string; } diff --git a/src/apis/images.ts b/src/apis/images.ts index f7ea451..95255c0 100644 --- a/src/apis/images.ts +++ b/src/apis/images.ts @@ -8,12 +8,12 @@ import OpenAI from "openai"; export interface ImagesBody { prompt: string; - model?: (string & {}) | "dall-e-2" | "dall-e-3"; + model?: (string & {}); n?: number | null; - quality?: "standard" | "hd"; - response_format?: "url" | "b64_json" | null; - size?: "256x256" | "512x512" | "1024x1024" | "1792x1024" | "1024x1792" | null; - style?: "vivid" | "natural" | null; + quality?: string; + response_format?: string | null; + size?: string | null; + style?: string | null; user?: string; } @@ -21,19 +21,19 @@ export interface ImageEditParams { image: any; prompt: string; mask?: any; - model?: (string & {}) | 'dall-e-2' | null; + model?: (string & {}) | null; n?: number | null; - response_format?: 'url' | 'b64_json' | null; - size?: '256x256' | '512x512' | '1024x1024' | null; + response_format?: string | null; + size?: string | null; user?: string; } export interface ImageCreateVariationParams { image: any; - model?: (string & {}) | 'dall-e-2' | null; + model?: (string & {}) | null; n?: number | null; - response_format?: 'url' | 'b64_json' | null; - size?: '256x256' | '512x512' | '1024x1024' | null; + response_format?: string | null; + size?: string | null; user?: string; } @@ -68,7 +68,7 @@ export class Images extends ApiResource { baseURL: this.client.baseURL, defaultHeaders: {...this.client.customHeaders, ...this.client.portkeyHeaders}, }); - + // @ts-ignore const result = await OAIclient.images.generate(body, opts).withResponse(); return finalResponse(result); @@ -94,6 +94,7 @@ export class Images extends ApiResource { defaultHeaders: {...this.client.customHeaders, ...this.client.portkeyHeaders}, }); + // @ts-ignore const result = await OAIclient.images.edit(body, opts).withResponse(); return finalResponse(result); @@ -118,7 +119,7 @@ export class Images extends ApiResource { baseURL: this.client.baseURL, defaultHeaders: {...this.client.customHeaders, ...this.client.portkeyHeaders}, }); - + // @ts-ignore const result = await OAIclient.images.createVariation(body, opts).withResponse(); return finalResponse(result); diff --git a/src/apis/threads.ts b/src/apis/threads.ts index a767b2b..49f0eb9 100644 --- a/src/apis/threads.ts +++ b/src/apis/threads.ts @@ -38,7 +38,7 @@ export class Threads extends ApiResource { baseURL: this.client.baseURL, defaultHeaders: {...this.client.customHeaders, ...this.client.portkeyHeaders}, }); - + // @ts-ignore const result = await OAIclient.beta.threads.create(body, opts).withResponse(); return finalResponse(result); @@ -175,7 +175,7 @@ export class Messages extends ApiResource{ baseURL: this.client.baseURL, defaultHeaders: {...this.client.customHeaders, ...this.client.portkeyHeaders}, }); - + // @ts-ignore const result = await OAIclient.beta.threads.messages.create(threadId, body, opts).withResponse(); return finalResponse(result); @@ -201,7 +201,7 @@ export class Messages extends ApiResource{ baseURL: this.client.baseURL, defaultHeaders: {...this.client.customHeaders, ...this.client.portkeyHeaders}, }); - + // @ts-ignore const result = await OAIclient.beta.threads.messages.list(threadId, query, opts).withResponse(); return finalResponse(result); @@ -286,7 +286,7 @@ export class Files extends ApiResource{ baseURL: this.client.baseURL, defaultHeaders: {...this.client.customHeaders, ...this.client.portkeyHeaders}, }); - + // @ts-ignore const result = await OAIclient.beta.threads.messages.files.list(threadId, messageId, query, opts).withResponse(); return finalResponse(result); @@ -376,7 +376,7 @@ export class Runs extends ApiResource{ baseURL: this.client.baseURL, defaultHeaders: {...this.client.customHeaders, ...this.client.portkeyHeaders}, }); - + // @ts-ignore const result = await OAIclient.beta.threads.runs.list(threadId, query, opts).withResponse(); return finalResponse(result); @@ -511,7 +511,7 @@ export class Steps extends ApiResource{ baseURL: this.client.baseURL, defaultHeaders: {...this.client.customHeaders, ...this.client.portkeyHeaders}, }); - + // @ts-ignore const result = await OAIclient.beta.threads.runs.steps.list(threadId, runId, query, opts).withResponse(); return finalResponse(result); @@ -555,7 +555,7 @@ export interface ThreadCreateParams { export namespace ThreadCreateParams { export interface Message { content: string; - role: 'user'; + role: string; file_ids?: Array; metadata?: unknown | null; } @@ -567,13 +567,13 @@ export interface ThreadUpdateParams { export interface MessageCreateParams { content: string; - role: 'user'; + role: string; file_ids?: Array; metadata?: unknown | null; } export interface MessageListParams extends CursorPageParams { - order?: 'asc' | 'desc'; + order?: string; } export interface CursorPageParams { @@ -584,7 +584,7 @@ export interface CursorPageParams { export interface FileListParams extends CursorPageParams { before?: string; - order?: 'asc' | 'desc'; + order?: string; } export interface MessageUpdateParams { @@ -612,12 +612,12 @@ export interface ThreadCreateAndRunParams { export interface RunListParams extends CursorPageParams { before?: string; - order?: 'asc' | 'desc'; + order?: string; } export interface StepListParams extends CursorPageParams { before?: string; - order?: 'asc' | 'desc'; + order?: string; } export interface RunUpdateParams {