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

[Go] improve API #523

Merged
merged 2 commits into from
Jul 2, 2024
Merged

[Go] improve API #523

merged 2 commits into from
Jul 2, 2024

Commits on Jul 2, 2024

  1. [Go] improve API

    This PR consists solely of refactoring. There are no behavior changes.
    
    Address the following warts on the API:
    
    - Although flows are a key concept in Genkit, and the genkit package
      includes a DefineFlow function, the Flow type itself lived in the core
      package.
    
    - The core package contained several exported methods that were intended
      only to be called by the genkit package, a clear sign that something
      is off in the API design.
    
    The actual visible changes to achieve this are small, but a lot of
    code was moved. Most of the changes involve moving unexported symbols
    into internal packages so they could be used by other packages.
    
    The main API changes are:
    
    - Flow is now in the genkit package.
    
    - There are no more InternalXXX symbols in core.
    
    There are some other minor changes, like the removal of the NoStream
    type.
    jba committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    15996b2 View commit details
    Browse the repository at this point in the history
  2. reviewer comments

    jba committed Jul 2, 2024
    Configuration menu
    Copy the full SHA
    fa89adc View commit details
    Browse the repository at this point in the history