eliza icon indicating copy to clipboard operation
eliza copied to clipboard

feat: Add Custom System Prompt Support for plugin-image-generation

Open tsubasakong opened this issue 1 year ago • 1 comments

Relates to:

Image generation quality improvement and prompt engineering

Risks

Low - Adds new optional parameter for system prompts and enhanced image prompt generation without modifying core functionality.

Background

What does this PR do?

This PR enhances the text generation system by:

  1. Adding customSystemPrompt parameter to generateText function for image gen system prompt
  2. Implementing structured prompt engineering for image generation
  3. Creating detailed prompt generation guidelines with specific steps
  4. Setting up a standardized prompt structure for consistency
  5. Adding style-specific prompt customization

What kind of change is this?

Features (non-breaking change which adds functionality)

Why are we doing this?

To improve image generation quality by providing structured, detailed prompts that consider key aspects like:

  • Main subject focus
  • Environment and setting
  • Lighting and atmosphere
  • Color relationships
  • Composition guidelines
  • Style integration

Documentation changes needed?

My changes require a change to the project documentation to document:

  • New customSystemPrompt parameter in generateText
  • Image prompt structure and guidelines
  • Style customization options

Testing

Where should a reviewer start?

  1. Review the generateText changes in packages/core/src/generation.ts
  2. Check the image prompt system in image generation implementation
  3. Examine the structured prompt generation workflow

Detailed testing steps

I tested locally by running pnpm start with a new character that had ModelProviderName.HEURIST as the modelProvider and "direct" in the clients. Everything seemed to work well.

Deploy Notes

No special deployment steps required. Feature is automatically active when using the plugin-image-generation functionality.

Discord username

tao8617

tsubasakong avatar Dec 04 '24 09:12 tsubasakong

SImple conflict that needs to be resolve, otherwise LGTM

odilitime avatar Dec 14 '24 17:12 odilitime

I update to the latest "develop" branch and run the approval again. Seems no conflict?

tsubasakong avatar Dec 28 '24 07:12 tsubasakong