Welcome to Portkey Forum

Updated 8 months ago

Typescript compilation error in assistants.ts

At a glance
Plain Text
βœ— npm run build:ts

> ai-browser@1.8.0 build:ts
> tsc

node_modules/portkey-ai/dist/src/apis/assistants.ts:209:56 - error TS2339: Property 'files' does not exist on type 'Assistants'.

209         const result = await OAIclient.beta.assistants.files.create(assistantId, body, opts).withResponse();
                                                           ~~~~~

node_modules/portkey-ai/dist/src/apis/assistants.ts:261:56 - error TS2339: Property 'files' does not exist on type 'Assistants'.

261         const result = await OAIclient.beta.assistants.files.retrieve(assistantId, fileId, opts).withResponse();
                                                           ~~~~~

node_modules/portkey-ai/dist/src/apis/assistants.ts:286:56 - error TS2339: Property 'files' does not exist on type 'Assistants'.

286         const result = await OAIclient.beta.assistants.files.del(assistantId, fileId, opts).withResponse();
                                                           ~~~~~

node_modules/portkey-ai/dist/src/apis/threads.ts:319:62 - error TS2339: Property 'files' does not exist on type 'Messages'.

319         const result = await OAIclient.beta.threads.messages.files.retrieve(threadId, messageId, fileId, opts).withResponse();
                                                                 ~~~~~


Found 4 errors in 2 files.

Errors  Files
     3  node_modules/portkey-ai/dist/src/apis/assistants.ts:209
     1  node_modules/portkey-ai/dist/src/apis/threads.ts:319

Getting this error while building the project as typescript, how to fix?
r
C
2 comments
@visarg @chandypaaji
Hey! @Harsh Gupta

The current Portkey SDK supports OpenAI SDK 4.36.0

However, we are updating our SDK to support the current OpenAI SDK. We are going to release it soon.

Thanks.
Add a reply
Sign up and join the conversation on Discord