Conversation
… functions for strapi v5
…n to be as the Strapi v5 creates them
🦋 Changeset detectedLatest commit: cb26dc6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Pull request overview
This PR updates the chatbot and indexing pipeline to consume the new Strapi v5 S3 sync JSON structure (notably the top-level data array and flattened fields), and refreshes the local Docker fixtures accordingly.
Changes:
- Update product list parsing to read from
safe_json_load(...)[ "data" ]and use flattened fields (isVisible,slug). - Update API docs parsing in the indexer to consume Strapi v5 API payload shape.
- Refresh local Docker S3 fixture JSON files and adjust the local index creation script to include API docs.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| apps/chatbot/src/modules/documents.py | Switch product parsing to Strapi v5 JSON shape; change empty-content handling. |
| apps/chatbot/docker/files/s3/it/synced-products-response.json | Update products fixture to Strapi v5 response format. |
| apps/chatbot/docker/files/s3/it/synced-apis-data-response.json | Replace APIs fixture with Strapi v5 response format (much larger payload). |
| apps/chatbot-index/src/modules/documents.py | Update product + API docs parsing to match Strapi v5 response format. |
| apps/chatbot-index/scripts/run.create.index.sh | Run index creation with --static --api instead of --static --clean-redis. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Branch is not up to date with base branch@mdciri it seems this Pull Request is not updated with base branch. |
|
|
||
| echo '-=-=-=-= run Create Index' | ||
| python src/modules/create_vector_index.py --static --clean-redis | ||
| python src/modules/create_vector_index.py --static --api |
There was a problem hiding this comment.
is this related to the updates for Strapi 5?
There was a problem hiding this comment.
yes, I emulated the flow in the docker compose to test that everything works just fine. Indeed, I edited the json files of products and API as Strapi v5 does, and running the create index for the developer portal, the scripts consider the API file too.
Jira Pull Request LinkThis Pull Request refers to the following Jira issue CAI-876 |
|
This PR exceeds the recommended size of 800 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
Depends on #2134
List of Changes
Update of the reading of the API and Products files in AWS S3 generated by Strapi v5
Motivation and Context
Strapi v5 saves the files differently from the previous version
How Has This Been Tested?
Locally with Docker compose
Screenshots (if appropriate):
Types of changes
Checklist: