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

Added code generator feature #89

Merged
merged 21 commits into from
Jan 19, 2023
Merged

Added code generator feature #89

merged 21 commits into from
Jan 19, 2023

Conversation

chrisdedman
Copy link
Collaborator

@chrisdedman chrisdedman commented Dec 21, 2022

Added feature to generate code from OpenAI API. issue #85

@chrisdedman chrisdedman self-assigned this Dec 21, 2022
@chrisdedman chrisdedman changed the base branch from chrisdedman-patch-1 to main December 21, 2022 02:25
@chrisdedman chrisdedman changed the base branch from main to chrisdedman-patch-1 December 21, 2022 02:26
@chrisdedman chrisdedman changed the base branch from chrisdedman-patch-1 to main December 21, 2022 02:34
Copy link
Contributor

@PenguinBoi12 PenguinBoi12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good. A few things to change, specifically about the way the API key is handled but otherwise it seems pretty good. Well done.

If you have any question about the config required, don't hesitate to ask on the server :)

bot/extensions/code_generator_cog.py Outdated Show resolved Hide resolved
bot/extensions/code_generator_cog.py Outdated Show resolved Hide resolved
bot/extensions/code_generator_cog.py Outdated Show resolved Hide resolved
bot/extensions/code_generator_cog.py Outdated Show resolved Hide resolved
Copy link
Contributor

@PenguinBoi12 PenguinBoi12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was pretty good. Nice improvement. However, there was some things that could've been improved. To avoid playing ping pong with you, I decided to adjust the code quickly.

One important issue that you could note for the future is the addition of ctx.defer() in code_generator. I've added that because the interaction failed when the request took too much time. Defer allows us to perform secondary action on the interaction.

@PenguinBoi12 PenguinBoi12 merged commit 8929d87 into main Jan 19, 2023
@PenguinBoi12 PenguinBoi12 deleted the chrisdedman-patch-2 branch January 19, 2023 06:31
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.

2 participants