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 create image edit #20

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

ysinjab
Copy link
Contributor

@ysinjab ysinjab commented Mar 26, 2023

  • Refactor Upload function to support uplading multiple files
  • Add support for create image edit. Check image/edit.go
  • Refactor examples/images to include two examples (edit & create)
  • Rename json tag for CreatedAt to Created

Copy link
Owner

@rakyll rakyll left a comment

Choose a reason for hiding this comment

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

This looks great, I left some minor comments but can resolve if you don't have bandwidth.

N: 3,
Prompt: "a cute baby",
Size: "1024x1024",
ResponseFormat: "b64_json",
Copy link
Owner

Choose a reason for hiding this comment

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

Do we need to break this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Could you please explain what do you mean by "break it"? do you mean into separate task or PR? or into set of values like enum?

Copy link
Owner

Choose a reason for hiding this comment

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

I was wondering if we can keep this as Format not to break the existing package.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh yes I got it now! I revert the field ResponseFormat to Format. I also reverted Created to CreatedAt.

log.Fatalf("ReadAll error: %v", err)
}
_ = data // use data

Copy link
Owner

Choose a reason for hiding this comment

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

Remove line.

image/create.go Outdated
Prompt string `json:"prompt,omitempty"`
N int `json:"n,omitempty"`
Size string `json:"size,omitempty"`
ResponseFormat string `json:"response_format,omitempty"`
Copy link
Owner

Choose a reason for hiding this comment

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

Ditto. Do we need to break it?

image/edit.go Outdated
Size string
ResponseFormat string
User string
N *int
Copy link
Owner

Choose a reason for hiding this comment

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

Let's use N int here, you can omit it if it's 0.

@ysinjab ysinjab requested a review from rakyll May 8, 2023 08:07
@gedw99
Copy link

gedw99 commented Aug 6, 2023

Hey @ysinjab and @rakyll

Is this ready or still waiting on changes ?

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