Welcome to Portkey Forum

Home
Members
Harsh Gupta
H
Harsh Gupta
Offline, last seen 2 months ago
Joined November 4, 2024
Facing a type error with portkey-ai 1.3.0
2 comments
C
r
Do we have support for Yi-Large? The API is already OpenAI compatible
Plain Text
https://api.01ww.xyz/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <key>" \
  -d '{
    "model": "yi-large",
    "messages": [{"role": "user", "content": "How good is yi-large?"}],
    "temperature": 0.3
  }'
5 comments
H
V
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?
2 comments
C
r
Not able to use portkey gateway with instructor js because max_tokens seems to be mandatory, code in thread
11 comments
V
H
Also the the Error message should specify if the error is from portkey's side or the providers and if it is running locally or on hosted version
4 comments
V
H