-
Notifications
You must be signed in to change notification settings - Fork 39
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: Generate Image by DALL·E 3 #493
Conversation
Deploying chatcraft-org with Cloudflare Pages
|
also really confusing that /dalle3 doesn't work |
I think it should be |
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.
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.
@mingming-ma These changes look good! It was a good idea to rename the command to "/image".
At the time of my review, @tarasglek and @humphd's suggestions have been addressed and incorporated into this PR:
I left ~3 observations/concerns that are either non-issues or can be addressed in follow-up PRs.
They shouldn't prevent this from being merged. @humphd do you agree?
I think we should also try to store the image similarly to how we upload images into chatcraft, so we can then ask gpt vision to analyze it(this can be done in followup) |
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.
@mingming-ma This is a pretty cool feature. Just left a few comments after reviewing.
@mingming-ma This might be unrelated to this PR, but I feel like the images should have a Can we make that change in this PR or a follow up? Another thing I wanted to suggest is that since image generation takes a long time, should we have an {
title: "Generating...",
message: "Please wait while the image gets generated."
} |
I filed an issue to fix store problem #496 , just want to inform you that at the moment user is able use vision to analyze the generated image |
@rjwignar I just saw @Amnish04 fixed an issue related the auto scroll, #495, I don't know it is related or not, let's see how it is after this be merged, sounds good? |
@mingming-ma I just undid that fix in #497 as that was causing nested submenus to break (more details here). But nonetheless, I don't think that was related to this issue |
25faac0
to
1b1d5b1
Compare
src/lib/ai.ts
Outdated
try { | ||
const response = await openai.images.generate({ | ||
model: "dall-e-3", | ||
prompt: prompt, |
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.
nit: when you have the same key/value names, only include it once:
{
model: "dall-e-e",
prompt,
n,
size,
}
In a follow-up, I wonder if we should add a menu item to the Options menu to allow you to do the same thing, but pop-up a little model where you type your prompt? Or maybe make it so entering a prompt and asking the dall-e model does this too? |
@humphd Just guessing the main concern here, let user know this feature more easily? |
Lots of users will never use/know about |
@mingming-ma Do we have an issue to track this #493 (comment) |
@mingming-ma One more thing, I feel like the image preview modal doesn't help much right now as most of the times we get a larger image in the message view itself. As a user, I would love to have an image zoom feature on click in the preview modal. We should do it in a separate issue. Examples at https://rpearce.github.io/react-medium-image-zoom/?path=/story/galleries--image-gallery @humphd Do we have anything already in our tree to help with it, or should we pull this library I mentioned. |
@Amnish04 Just filed #504 to track this
That's great! I'll investigate that later. |
I think we can merge this PR for now, @humphd @Amnish04 I'll create another issue follow up the react-medium-image-zoom Update: issue -> #505 |
Description
The function
generateImage
calls thedall-e-3
model api to get results. Add a new commandimage
on user side to display the image generated.How to test
Enter
prompt
after commandimage
in the input area:/image ${prompt}
Example:
/image Happy White Border Collie. Close up
Fixes: #124