Skip to content

Commit 0cd7aff

Browse files
committed
Updates to our migration guide
1 parent 0ea7046 commit 0cd7aff

File tree

4 files changed

+40
-25
lines changed

4 files changed

+40
-25
lines changed

.github/hookdoc-tmpl/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ For more information about using ClassifAI with WordPress, please see the [Class
66

77
To report an issue with ClassifAI or contribute back to the project, please visit the [GitHub repository](https://github.com/10up/classifai/).
88

9-
## Migrating to version 3.0
9+
## Migrating to version 3.0.0
1010

11-
Version 3.0 of ClassifAI contains breaking changes. Please review the [migration guide](./tutorial-migration-guide-v2-to-v3.html) tutorial and follow any steps required.
11+
Version 3.0.0 of ClassifAI contains breaking changes. Please review the [migration guide](./tutorial-migration-guide-v2-to-v3.html) for an overview of these changes and any action that may be required.
1212

1313
<a href="http://10up.com/contact/" class="banner"><img src="https://10updotcom-wpengine.s3.amazonaws.com/uploads/2016/10/10up-Github-Banner.png" width="850"></a>

.github/hookdoc-tmpl/static/styles-10up.css

+11
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ nav ul:nth-of-type(3) {
5050

5151
nav ul {
5252
font-size: 1.2rem;
53+
overflow: scroll;
5354
}
5455

5556
nav li a {
@@ -132,3 +133,13 @@ footer {
132133
padding: 2px 10px;
133134
line-height: 16px;
134135
}
136+
137+
table {
138+
width: 100%;
139+
table-layout: fixed;
140+
overflow: scroll;
141+
}
142+
143+
table td {
144+
overflow: scroll;
145+
}

hookdocs/meta.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
"title": "Useful snippets"
44
},
55
"wp-cli": {
6-
"title": "WP-CLI Commands"
6+
"title": "WP-CLI commands"
77
},
88
"migration-guide-v2-to-v3": {
9-
"title": "Migration Guide (Version 2 to Version 3)"
9+
"title": "Migration guide (version 2 to version 3)"
1010
}
1111
}

hookdocs/migration-guide-v2-to-v3.md

+25-21
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,22 @@
1-
**ClassifAI 3.0** introduces significant improvements and restructuring aimed at enhancing flexibility and extensibility. The key changes include a transition to a "**Feature first**" settings approach, where settings screens are now organized around specific Features rather than Service Providers. This allows for the integration of multiple AI providers for each feature, offering users greater customization options.
1+
**ClassifAI 3.0.0** introduces significant improvements and restructuring aimed at enhancing flexibility and extensibility. The key changes include a transition to a "**Feature first**" settings approach, where settings screens are now organized around specific Features rather than Service Providers. This allows for the integration of multiple AI providers for each Feature, offering users greater customization options.
22

3-
The migration process is streamlined with an **automated migration routine** that seamlessly transitions your existing settings to the new version upon upgrading to version 3.0.
3+
This restructuring required a change to how settings are stored. For any existing users of ClassifAI, this means old settings need to be migrated into this new structure. This migration process is streamlined with an **automated migration routine** that seamlessly transitions your existing settings to the new version upon upgrading to version 3.0.0. We recommend that you back up your database prior to upgrading just in case any issues arise during the migration process.
44

5-
This migration guide provides a detailed overview of the changes, including updates to the REST API endpoints and information regarding the removed hooks. Explore the details below to smoothly navigate and leverage the enhanced capabilities of ClassifAI 3.0.
5+
The rest of this guide provides an overview of the other major changes, including updates to the REST API endpoints and information regarding changes to hooks. If you've customized ClassifAI in any way, these changes may impact those customizations. Explore the details below to smoothly navigate and leverage the enhanced capabilities of ClassifAI 3.0.0.
66

77
### Provider Class Changes
8-
In ClassifAI v2, provider classes (such as ChatGPT, ComputerVision, DaLLE, NLU, Whisper, etc.) handled various aspects related to both provider and feature functionalities. This included functionalities such as feature access control, registering feature settings fields, managing provider fields, registering REST API endpoints, connecting to provider services, and exposing in-context features.
98

10-
With the introduction of the "Feature first" approach in ClassifAI 3.0, the provider class has undergone a significant transformation. It is now divided into two distinct classes: Feature and Provider. Consequently, all feature-related functionalities, including feature access control, registering feature settings fields, registering REST API endpoints, and exposing in-context features, have been moved to specific Feature classes. Provider-related tasks remain within the provider classes.
9+
In ClassifAI v2, Provider classes (such as ChatGPT, ComputerVision, DaLLE, NLU, Whisper, etc.) handled various aspects related to both Provider and Feature functionalities. This included things such as feature access control, registering feature settings fields, managing provider fields, registering REST API endpoints, connecting to provider services, and exposing in-context features.
1110

12-
If you have extended any of the Provider classes in your codebase, it is essential to update your code accordingly to align with the changes introduced in ClassifAI 3.0.
11+
With the introduction of the "Feature first" approach in ClassifAI 3.0.0, the Provider class has undergone a significant transformation. It is now divided into two distinct classes: Feature and Provider. Consequently, all feature-related functionalities, including feature access control, registering feature settings fields, registering REST API endpoints, and exposing in-context features, have been moved to specific Feature classes. Provider-related tasks remain within the provider classes.
1312

14-
### REST API Changes
15-
To standardize the REST API endpoints, we have renamed some of the REST endpoints in ClassifAI 3.0. There are no changes in the request body or parameters. You can find them below.
13+
If you have extended any of the Provider classes in your codebase, it is essential to update your code accordingly to align with the changes introduced in ClassifAI 3.0.0.
1614

17-
| ClassifAI version 2.x | ClassifAI version 3.x |
18-
| --- | --- |
19-
| **GET** `/classifai/v1/generate-tags/{POST_ID}` | **GET** `/classifai/v1/classify/{POST_ID}` |
20-
| **GET** `/classifai/v1/openai/generate-excerpt/{POST_ID}` | **GET** `/classifai/v1/generate-excerpt/{POST_ID}` |
21-
| **POST** `/classifai/v1/openai/generate-excerpt/` | **POST** `/classifai/v1/generate-excerpt/` |
22-
| **GET** `/classifai/v1/openai/generate-transcript/{POST_ID}` | **GET** `/classifai/v1/generate-transcript/{POST_ID}` |
23-
| **GET** `/classifai/v1/openai/generate-title/{POST_ID}` | **GET** `/classifai/v1/generate-title/{POST_ID}` |
24-
| **POST** `/classifai/v1/openai/generate-title/` | **POST** `/classifai/v1/generate-title/` |
25-
| **POST** `/classifai/v1/openai/resize-content/` | **POST** `/classifai/v1/resize-content/` |
26-
| **GET** `/classifai/v1/openai/generate-image/` | **GET** `/classifai/v1/generate-image/` |
15+
For a detailed look at how new Providers can be added directly to ClassifAI, take a look at these PRs: [#700](https://github.com/10up/classifai/pull/700); [#716](https://github.com/10up/classifai/pull/716). For a detailed look at how a new Feature can be added directly to ClassifAI, take a look at this PR: [#531](https://github.com/10up/classifai/pull/531).
2716

17+
### Filter Hook Changes
2818

29-
### Filter hooks Changes
30-
To standardize the action/filter names, we have removed and updated some of the filter hooks in ClassifAI 3.0. You can find them below, along with their replacements.
19+
To standardize the action/filter names, we have removed and updated some of the filter hooks in ClassifAI 3.0.0. If you've extended ClassifAI at all with the provided hooks, be sure to update those accordingly.
3120

3221
| ClassifAI version 2.x | Replacement in ClassifAI version 3.x |
3322
| --- | --- |
@@ -47,6 +36,21 @@ To standardize the action/filter names, we have removed and updated some of the
4736
| **`classifai_rest_bases`** | _Removed in ClassifAI 3.0_ |
4837
| **`classifai_should_register_save_post_handler`** | _Removed in ClassifAI 3.0_ |
4938

50-
Aside from these filter hooks, ClassifAI 3.0 introduces many new actions and filters, which you can find [here](./index.html)
39+
Aside from these hook changes, ClassifAI 3.0.0 introduces many new actions and filters, which you can find [here](./index.html)
40+
41+
### REST API Changes
42+
43+
To standardize the REST API endpoints, we have renamed some of the REST endpoints in ClassifAI 3.0.0. There are no changes in the request body or parameters. If you are directly using any of these endpoints, be sure to update those accordingly.
44+
45+
| ClassifAI version 2.x | ClassifAI version 3.x |
46+
| --- | --- |
47+
| **GET** `/classifai/v1/generate-tags/{POST_ID}` | **GET** `/classifai/v1/classify/{POST_ID}` |
48+
| **GET** `/classifai/v1/openai/generate-excerpt/{POST_ID}` | **GET** `/classifai/v1/generate-excerpt/{POST_ID}` |
49+
| **POST** `/classifai/v1/openai/generate-excerpt/` | **POST** `/classifai/v1/generate-excerpt/` |
50+
| **GET** `/classifai/v1/openai/generate-transcript/{POST_ID}` | **GET** `/classifai/v1/generate-transcript/{POST_ID}` |
51+
| **GET** `/classifai/v1/openai/generate-title/{POST_ID}` | **GET** `/classifai/v1/generate-title/{POST_ID}` |
52+
| **POST** `/classifai/v1/openai/generate-title/` | **POST** `/classifai/v1/generate-title/` |
53+
| **POST** `/classifai/v1/openai/resize-content/` | **POST** `/classifai/v1/resize-content/` |
54+
| **GET** `/classifai/v1/openai/generate-image/` | **GET** `/classifai/v1/generate-image/` |
5155

5256
If you encounter any issues after migration, please feel free to report them [here](https://github.com/10up/classifai/issues/new/choose)

0 commit comments

Comments
 (0)