This PR addresses issue #23 by implementing the use of images returned by Tavily's search API in our component creation process, replacing the previous method of using generic placeholder images. It also introduces image descriptions in the PRD tool to enhance the relevance of queried images and adds configuration for S3 upload.
Changes
Search Service Enhancement
Updated the performSearch function to handle and store image results from Tavily.
Implemented logic for separate image queries when provided.
PRD Tool Update
Added a new field for image descriptions in the PRD tool input schema.
Modified the PRD generation process to include these image descriptions.
Onboarding Tool Controller Update
Updated the product manager tool to incorporate image descriptions and Tavily image results into the PRD.
Implemented new search functionality using image descriptions to query Tavily for relevant images.
CTO Tool Controller Improvements
Enhanced the search tool handling to process and include Tavily image results in the response.
Code Service Refinement
Updated the extractPlaceholderImages function to parse and return image information from the PRD, including new image descriptions.
Environment Configuration
Added a new environment variable UPLOAD_TO_S3 to control whether websites are uploaded to S3 or stored locally.
Impact
Resolves issue #23 by replacing generic placeholder images with relevant images from Tavily search results.
Image queries are more targeted and relevant due to specific image descriptions.
Improved visual relevance and coherence in generated websites.
More efficient use of available data from our search API partner.
Flexible storage options for generated websites (S3 or local filesystem).
Implementation Details
The changes primarily affect the following files:
server/services/searchService.js
server/controllers/onboardingToolController.js
server/controllers/ctoToolController.js
server/services/codeService.js
New environment variable added to .env.template:
UPLOAD_TO_S3=false
Attaching screenshots as reference in the comments below
Summary
This PR addresses issue #23 by implementing the use of images returned by Tavily's search API in our component creation process, replacing the previous method of using generic placeholder images. It also introduces image descriptions in the PRD tool to enhance the relevance of queried images and adds configuration for S3 upload.
Changes
Search Service Enhancement
performSearch
function to handle and store image results from Tavily.PRD Tool Update
Onboarding Tool Controller Update
CTO Tool Controller Improvements
Code Service Refinement
extractPlaceholderImages
function to parse and return image information from the PRD, including new image descriptions.Environment Configuration
UPLOAD_TO_S3
to control whether websites are uploaded to S3 or stored locally.Impact
Implementation Details
server/services/searchService.js
server/controllers/onboardingToolController.js
server/controllers/ctoToolController.js
server/services/codeService.js
.env.template
:Attaching screenshots as reference in the comments below