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

Refactor library #1

Merged
merged 30 commits into from
Jan 20, 2023
Merged

Refactor library #1

merged 30 commits into from
Jan 20, 2023

Conversation

adayNU
Copy link
Contributor

@adayNU adayNU commented Jan 18, 2023

Seeks to re-factor the original repo w/ many breaking changes. Major goals:

  1. Use more idiomatic go style. (Rename the package, accept and return pointers, shorter variable names, etc.)
  2. Much better documentation. Add comments to all exported types, fields, methods, packages, etc. (from OpenAI's documentation).
  3. Make option fields who's go default value is a valid parameter value (and also does not match the API's default) pointers, so omitempty does not strip explicitly set values. (See here for more).
  4. Have a consistent style throughout. Most endpoints in the original library were implemented independently (and thus their usages feel inconsistent).
  5. Implement all endpoints.

Let me know your thoughts (especially around request fields, and whether or not they should be pointers).


This change is Reviewable

Copy link
Contributor

@neilmadsen neilmadsen left a comment

Choose a reason for hiding this comment

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

Reviewed 34 of 34 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @adayNU)

@adayNU adayNU merged commit 106d762 into fabiustech:main Jan 20, 2023
@adayNU adayNU deleted the draft/refactor-library branch January 20, 2023 14:21
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