-
Notifications
You must be signed in to change notification settings - Fork 232
Add Feature to Inject AI-Generated Code into LeetCode Editor #9
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
base: main
Are you sure you want to change the base?
Conversation
adityadafe
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly nits, but good job
src/content/content.tsx
Outdated
| .replace('{{user_code}}', extractedCode); | ||
|
|
||
| const apiResponse = await openai.chat.completions.create({ | ||
| model: 'gpt-4', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ability to select which model to use should be given to user as we are using their api key right ?
src/content/content.tsx
Outdated
|
|
||
| const apiResponse = await openai.chat.completions.create({ | ||
| model: 'gpt-4', | ||
| messages: [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why was response_format removed ?
|
I guess you need to change system prompt also too and tell AI to give code as a separate key in output. |
adityadafe
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM @piyushgarg-dev do you think prompt is okay ?
This Pull Request fixes #5 , I am loving this project. I'd love to contribute more just lemme know if there is any changes needed!