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

Add openai app example #195

Merged
merged 21 commits into from
Sep 21, 2023
Merged

Add openai app example #195

merged 21 commits into from
Sep 21, 2023

Conversation

horeaporutiu
Copy link
Contributor

@horeaporutiu horeaporutiu commented Sep 19, 2023

Add AI Image generation app to app-examples

  • README w/ demo and template
  • addressed Kirill's feedback

@vercel
Copy link

vercel bot commented Sep 19, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
app-examples-wordle ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 21, 2023 2:46pm
webhooks-manager ❌ Failed (Inspect) Sep 21, 2023 2:46pm

Copy link
Collaborator

@kirillsud kirillsud left a comment

Choose a reason for hiding this comment

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

Great example! I have no critical comments about the implementation. The code is clear and focused on the scenario. I have only small comments like using console.log and etc.

examples/ai-image-generator/pages/api/openai.js Outdated Show resolved Hide resolved
examples/ai-image-generator/pages/index.jsx Outdated Show resolved Hide resolved
examples/ai-image-generator/src/assets/congratulations.png Outdated Show resolved Hide resolved
examples/ai-image-generator/src/assets/welcome.png Outdated Show resolved Hide resolved
examples/ai-image-generator/pages/index.jsx Outdated Show resolved Hide resolved
examples/ai-image-generator/pages/index.jsx Outdated Show resolved Hide resolved
examples/ai-image-generator/pages/index.jsx Show resolved Hide resolved
@horeaporutiu
Copy link
Contributor Author

Should be ready for app-examples (hopefully 🤞🏼) now!

examples/ai-image-generator/components/Button.jsx Outdated Show resolved Hide resolved
examples/ai-image-generator/pages/index.jsx Outdated Show resolved Hide resolved
examples/ai-image-generator/src/assets/style.css Outdated Show resolved Hide resolved
examples/ai-image-generator/src/assets/style.css Outdated Show resolved Hide resolved
const response = await openai.images.generate({
prompt: prompt,
});
let image_url = response.data[0].url;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
let image_url = response.data[0].url;
const image_url = response.data[0].url;

@horeaporutiu horeaporutiu merged commit ccbff24 into main Sep 21, 2023
2 checks passed
@horeaporutiu horeaporutiu deleted the add-openai-app-example branch September 21, 2023 14:49
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.

3 participants