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

[Bug]: TS Compile Issue in Yarn #56

Closed
1 task done
SimonPringleWallace opened this issue Apr 22, 2024 · 8 comments
Closed
1 task done

[Bug]: TS Compile Issue in Yarn #56

SimonPringleWallace opened this issue Apr 22, 2024 · 8 comments
Labels
bug Something isn't working

Comments

@SimonPringleWallace
Copy link

Contact Details

[email protected]

What happened?

After installing the node-sdk into a React project and running yarn start I'm receiving the following output. Granted, for demo purposes I am attempting to integrate this into a React app rather than a more typical Node implementation so my use case on its own may account for the issue. Any insight you could provide would be most appreciated!

Version

0.1.xx (Default)

Relevant log output

webpack compiled successfully
ERROR in node_modules/portkey-ai/dist/src/apis/assistants.ts:209:56
TS2339: Property 'files' does not exist on type 'Assistants'.
    207 |         });
    208 |     
  > 209 |         const result = await OAIclient.beta.assistants.files.create(assistantId, body, opts).withResponse();
        |                                                        ^^^^^
    210 |
    211 |         return finalResponse(result);
    212 |     }

ERROR in node_modules/portkey-ai/dist/src/apis/assistants.ts:261:56
TS2339: Property 'files' does not exist on type 'Assistants'.
    259 |         });
    260 |     
  > 261 |         const result = await OAIclient.beta.assistants.files.retrieve(assistantId, fileId, opts).withResponse();
        |                                                        ^^^^^
    262 |
    263 |         return finalResponse(result);
    264 |     } 

ERROR in node_modules/portkey-ai/dist/src/apis/assistants.ts:286:56
TS2339: Property 'files' does not exist on type 'Assistants'.
    284 |         });
    285 |     
  > 286 |         const result = await OAIclient.beta.assistants.files.del(assistantId, fileId, opts).withResponse();
        |                                                        ^^^^^
    287 |
    288 |         return finalResponse(result);
    289 |     } 

ERROR in node_modules/portkey-ai/dist/src/apis/threads.ts:319:62
TS2339: Property 'files' does not exist on type 'Messages'.
    317 |         });
    318 |     
  > 319 |         const result = await OAIclient.beta.threads.messages.files.retrieve(threadId, messageId, fileId, opts).withResponse();
        |                                                              ^^^^^
    320 |
    321 |         return finalResponse(result);
    322 |     }

Code of Conduct

  • I agree to follow this project's Code of Conduct
@SimonPringleWallace SimonPringleWallace added the bug Something isn't working label Apr 22, 2024
Copy link

dosubot bot commented Apr 22, 2024

It looks like the TypeScript compiler is having trouble finding the 'files' property on the 'Assistants' and 'Messages' types in your project. This issue could stem from a few different areas:

  1. TypeScript Configuration: Check your tsconfig.json to ensure it's correctly set up to include the necessary files and directories. Adjust the "include" or "exclude" settings if needed.

  2. Correct Imports: Verify that the Assistants and Files classes are correctly imported where you're trying to access the files property.

  3. Correct Usage: Make sure that the object you're trying to access files from is correctly typed as Assistants.

  4. Module Resolution: If importing from a package or module, ensure your module resolution paths are correctly set up.

The files property should be available on the Assistants class as it's intended to be part of the Portkey Node SDK's structure. If these steps don't resolve the issue, it might be worth checking the version compatibility of the TypeScript compiler or revisiting the SDK's documentation for any known issues or additional setup requirements specific to React projects.

Details

Sources


About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

To continue the conversation, mention @dosu.

@SimonPringleWallace
Copy link
Author

Update: I believe this is related to my use of OpenAI's Assistants API, which I don't believe is supported by Portkey as of yet.

@vrushankportkey
Copy link
Collaborator

Thank you for raising this @SimonPringleWallace. This is happening because of the latest changes by OpenAI to the Assistants API.

We are actively working on fixing this on priority #58

@SimonPringleWallace
Copy link
Author

Thank you for the update! Appreciate you all getting this fixed so quickly.

@unicolored
Copy link

Hello! I have the same build issue.

Is there a workaround until the bug is fixed?

@VisargD
Copy link
Collaborator

VisargD commented May 3, 2024

Hey. Sorry for the delay here. We are releasing a new version in a hour which should solve this issue.

@VisargD
Copy link
Collaborator

VisargD commented May 3, 2024

This should be fixed now with latest version v1.3.0 . Please try and let us know if you face any issues.

@unicolored
Copy link

unicolored commented May 3, 2024

Indeed @VisargD ! No more build issue 😊
Congrats on the release!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants