eliza
eliza copied to clipboard
fix: image generation using imageSettings
Relates to:
So I started working on adding additional venice features for image generation and noticed that image settings for all models are currently completely broken. None of the imageSettings from character files which is what the docs currently say to use are actually passed to the API call. So before I submit the PR to add more venice features (I have this PR done as well) I figured I'd submit this to fix imageSettings for character files (while still retaining the ability to pass these options with js etc).
https://github.com/elizaOS/eliza/issues/1370
Risks
Low risk, this just provides a fix to an already tested feature.
Background
What does this PR do?
We added relevant imageSettings to our types file, created a call to pull the imageSettings in the image generation plugin and then looked for those settings when making our API call to generate an image.
What kind of change is this?
This is a bug fix, I have a feature PR ready for once this is merged.
Documentation changes needed?
No documentation changes needed as this actually just fixes what is already suggested in the docs (using imageSettings in character file for image settings)
Testing
Where should a reviewer start?
First you can test the current develop branch that the settings are not used in a character file by adding these settings (the width&height change is easiest)
If you're using openai make sure you use 1792x1024 (or a different supported size option other than the 1024x1024 default) as openai won't let you pick just any size (Venice lets you pick whatever size though)
Detailed testing steps
Now do the same test with this PR and you will notice your settings are passed and your image size is now using your settings.