-
Notifications
You must be signed in to change notification settings - Fork 13
Pull in the various AI dependencies we'll be using #50
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
Conversation
…he 0.1.0 release requires PHP 8.1+
…autoloader as this is suggested for the MCP Adapter
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
https://packagist.org/packages/wordpress/abilities-api#v0.4.0-rc is available now. It contains all the latest and greatest from WordPress 6.9 beta. It will be promoted to the stable release as soon as we confirm it integrates seamlessly with plugins. |
Thanks for the heads up on that. I've updated this PR to pull the 0.4.0-rc version, noting all of these versions will continually be updating as needed going forward but might as well use the latest and greatest from the start |
| "type": "wordpress-plugin", | ||
| "license": "GPL-2.0-or-later", | ||
| "require": { | ||
| "automattic/jetpack-autoloader": "^5.0", |
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.
Just chiming in here with a thought (not reason to change anything at all, just something to think about): An alternative to trying to only load one version of the dependency would be to prefix the bundled dependencies.
Benefit: More robust, as it prevents conflicts due to minor differences between different versions if one plugin used an API slightly differently.
Drawback: Code will be "unnecessarily" (at least almost unnecessarily) loaded multiple times, and the initial setup is a little more tricky.
It's certainly a tradeoff. But I'd be inclined to eventually document both as reasonable alternative paths for pulling in and loading those dependencies.
Description of the Change
The AI Experiments plugin will be building on top of the other AI building blocks, namely the Abilities API, the MCP Adapter and the WordPress/PHP AI Client.
This PR brings all of those in as composer dependencies, though worth a discussion here on if that's the way we want to handle things. We could instead require those to be installed as separate plugins (probably using the
Requires Pluginsheader) or even just rely on what ends up in WordPress 6.9 (at least for the Abilities API).My opinion here is that by bundling, we make the user experience nicer (don't require multiple additional plugins to be installed) and we control what versions we're relying on (allowing us to use newer things that may not end up in WordPress 6.9). But open to other thoughts.
At the moment, this is what's pulled in:
trunkversion of MCP Adapter, as the only current release (v0.1.0) requires PHP 8.1+trunkversion of WP AI Client, noting I debated pulling in this branch so we could take advantage of the settings that introduces, but hoping that can be merged in soonrepositoriesconfig to pull this inIn addition, the MCP Adapter suggests using the Jetpack Autoloader so also pulling that in and switching to loading that over the default composer autoloader.
How to test the Change
composer installai.phpto change 6.9 to 6.8 (this is fixed in Add in various test GitHub Action workflows #49)Test using WordPress Playground
The changes in this pull request can be previewed and tested using this WordPress Playground instance:
Click here to test this pull request.