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

Update to latest openai and fix prompt cli arg #52

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vinnymac
Copy link

@vinnymac vinnymac commented Feb 5, 2024

Summary

This change updates jscodemod to the latest openai library and makes all the necessary changes to support it. Also fixes prompt CLI issue that prevents the demo:* commands from working.

Some work may still be needed to do proper error handling, as it looks like that changed in v4 as well. But testing is needed.

@pjanik
Copy link

pjanik commented May 24, 2024

I've tried to clone your branch and run it locally, but running into issues:

"message": "Could not transform file "/abc.js". It is too large. To address this:\n \n1. Use the codemod's ignore API to ignore it.\n2. Or split the file into smaller pieces.\n3. Or use a model with a larger token limit.\n\nYou can read more about model limits at https://beta.openai.com/docs/models/overview. To see how many tokens your code is, see the tool at https://beta.openai.com/tokenizer. Your code must take up less than half the token limit of the model, because the token limit applies to both the input and the output, so we need to leave a headroom of 50% for the model to have room to respond.",

It doesn't matter how small or large is the file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants