Skip to content

Conversation

@httpdss
Copy link
Owner

@httpdss httpdss commented May 16, 2025

Overview

This PR improves the prompt-based file generation functionality by allowing the OpenAI-assisted file generation process to consider and modify existing file content when applicable.

Changes

  • Added support for passing existing file content to the OpenAI prompt within file_item.py.
  • Updated default OpenAI model to gpt-4.1 from gpt-3.5-turbo.
  • Modified generate.py to read existing file content and pass it to the process_prompt() method.
  • Created a new example configuration file example/gpt.yaml demonstrating usage with user prompts.

Justification

This change provides more intelligent and context-aware file generation by allowing existing content to be passed into the prompt. It helps to enhance productivity and avoid overwriting relevant content unintentionally.

Impact

  • Improves integration with OpenAI by enabling content-aware generation.
  • Prevents accidental data loss when regenerating files.
  • Demonstrates usage with an example YAML file, aiding users in understanding configuration.

@httpdss httpdss changed the title Enhance file processing to include existing content in prompts for modifications Enhance prompt processing with existing file content support May 16, 2025
@httpdss httpdss added the minor label May 16, 2025
@httpdss httpdss merged commit 12e2658 into main May 16, 2025
3 checks passed
@httpdss httpdss deleted the file-modification-prompting branch May 16, 2025 21:31
@httpdss httpdss moved this to Done in struct-mainboard May 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants