-
Notifications
You must be signed in to change notification settings - Fork 105
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] googleai: revised plugin design #326
Conversation
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.
It feels a bit weird to me. We set up state initially and then look it up again later. Why not just return it? But I guess if this is what Genkit wants, it's not terrible.
I agree with you, but the JS folks are more comfortable with action-at-a-distance than we are. They want the convenience of not having to plumb the state through the program. I can see their point of view. |
This illustrates the new plugin design: - Plugins are initialized with an Init function that holds configuration. - All models and other entities are defined in Init. - Plugins have global state. - Configured values can be retrieved by top-level functions that take strings as arguments.
This illustrates the new plugin design:
Plugins are initialized with an Init function that holds
configuration.
All models and other entities are defined in Init.
Plugins have global state.
Configured values can be retrieved by top-level functions that
take strings as arguments.