- Implement method to get multilingual city descriptions
- Create worker for generating descriptions in the background
- Update database schema to include description translations
- Update AiService to fetch descriptions from City model
This commit introduces a feature to generate city descriptions
in multiple languages using AI. It includes methods for
caching descriptions and a background job to handle
generation to improve performance and user experience.
- Restructure home page layout for better visual appeal
- Add links to sponsorship badges for ImgLab and Product Hunt
- Ensure buttons are styled consistently with updated classes
These changes improve the user experience by providing a more attractive and informative layout. The addition of sponsorship badges also helps in promoting partnerships.
- Introduced constant MODELS for managing model names.
- Updated the `generate_image` method to switch between FLUX and DALL-E 3.
- Added `generate_image_dalle` and `generate_image_flux` methods for respective API calls.
- Enhanced prompts for image generation across both models, ensuring correct message construction.
This update enables users to generate images using different AI models dynamically, allowing for flexible integration and improved user experience. The handling of errors now falls back to the DALL-E model if the FLUX API fails.
- Update the prompt to specify generating a highly detailed and
photorealistic image for a specific weather moment.
- Enhance clarity regarding the scene's inspiration by retaining
context about the city, state, country, and region.
This change refines the AI generation process by focusing on
particular weather moments, improving the output's relevance and
detail, which could lead to a better user experience.
- Update prompt structure to enhance clarity and detail.
- Include specific requirements for realism and aesthetics in the images.
- Emphasize photorealistic elements, lighting, and composition rules.
These changes enable the AI to produce more accurate and visually appealing images based on weather conditions and city characteristics. It improves the instructions given to DALL-E, ensuring detailed and realistic output.
- Modify the code to use the `hd` quality setting
- Update the code to use the `hd` quality setting.
- Ensure there are no other side effects of this change.
- These changes will improve the user experience.
</commit_message>
- Add requirements for clearer and brighter images
- Specify maintenance of brightness even in overcast conditions
- Include enhancements for sunny day imagery
- Revise output prompt to remove unnecessary prefix and suffix
These changes improve the clarity and effectiveness of prompts
used in AI-generated imagery. The additional specifications help
guide the AI in producing visually appealing and contextually
relevant images for various weather conditions.
- Refactor prompt generation to separate location
description functionality
- Update user prompt generation for DALL-E 3
- Improve AI service's response handling
This change enhances the AiService by creating a more
modular approach to generating prompts. The introduction
of a `generate_location_desc` method improves the
detail and context provided in the generated prompts.
Furthermore, the `ask_ai` method centralizes AI request
logic, allowing for cleaner and more organized code.
These adjustments should improve the overall robustness
and readability of the prompt generation process.
- Include state, country, and region in the DALL-E prompt
- Enhance context for the generated weather scene
This change improves the specificity of the prompts generated
for the AI, providing more contextual information such as
state, country, and region alongside the city name. This
enhancement can lead to more accurate and relevant outputs
from the DALL-E 3 model for weather scenes.
- Include actual update time in weather report
- Rename watermark worker file for clarity
This commit enhances the weather data report by
updating the format to include the actual update time
retrieved from the weather service API. Additionally,
the watermark worker file has been renamed to improve
readability and consistency in the naming convention.
- Adjust formatting for message parameters in the chat call
- Eliminate unnecessary blank lines in generate_prompt_request method
- Ensure consistent styles for arrays and block indentation
These changes improve code readability and maintain consistency in
formatting for better maintainability without altering functionality.
- Created BatchGenerateWeatherArtsJob to process eligible
cities and generate weather art.
- Introduced GenerateWeatherArtJob for generating weather
art and image attachment.
- Added AiService for obtaining prompts and generating
images with OpenAI API.
- Implemented WeatherService to fetch current weather
data from the QWeather API.
- Updated Gemfile with necessary gems (whenever,
ruby-openai, httparty, down, aws-sdk-s3).
This commit introduces a system to create and store
weather art images for various cities based on current
weather conditions, leveraging external APIs for data
and image generation.