Commit Graph

9 Commits

Author SHA1 Message Date
0ef979e5c4 feat: refactor: change image generation quality
- 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>
2025-02-16 13:27:25 +08:00
be88aebac2 fix: update AI service logging and weather services 2025-02-13 17:21:41 +08:00
af4ee3ee21 feat: enhance image generation prompt clarity
- 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.
2025-02-12 11:56:09 +08:00
d045f532ec feat: enhance AI prompt generation logic
- 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.
2025-02-12 11:33:11 +08:00
e39c87ac5c feat: improve prompt generation with location details
- 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.
2025-02-12 10:02:47 +08:00
0352923c5b feat: update weather data report format
Some checks are pending
Docker / docker (push) Waiting to run
- 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.
2025-01-31 10:46:32 +08:00
b5c40f2e13 fix: update Dockerfile and weather service configuration
- Added 'libpq-dev' to the packages installed in the Dockerfile
- Updated the base_uri in WeatherService to use 'dig' for safer access

These changes improve the Docker environment by ensuring that
necessary PostgreSQL development headers are available during
installation. The weather service now safely accesses the
URI from the credentials, reducing the risk of errors when
fetching nested configuration data.
2025-01-22 17:07:04 +08:00
853a1d03ce refactor: clean up ai_service code formatting
- 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.
2025-01-22 16:50:21 +08:00
d728d7f50e feat: add batch weather art generation jobs
- 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.
2025-01-22 16:50:00 +08:00