Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Text2Image interface refactored #752

Merged
merged 3 commits into from
Dec 2, 2024
Merged

Conversation

tomguluson92
Copy link
Contributor

Relates to: Text2Image plugin

Risks

Low

Background

Uniform interface and parameters and allow for flexible options input.

What does this PR do?

Upgrade the input parameter for sophisticated effect in ALL T2I interfaces.

What kind of change is this?

Updates

Documentation changes needed?

Testing

Where should a reviewer start?

Detailed testing steps

@tomguluson92 tomguluson92 changed the title [Text2Image] interface refactored fix: Text2Image interface refactored Dec 1, 2024
Copy link
Collaborator

@monilpat monilpat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this feel free to review comments thanks so much!

@@ -843,16 +838,18 @@ export const generateImage = async (
const imageURL = await response.json();
return { success: true, data: [imageURL] };
} else if (
// TODO: Fix LLAMACLOUD -> Together?
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be good to either remove or add an issue # to it!

runtime.imageModelProvider === ModelProviderName.LLAMACLOUD
) {
const together = new Together({ apiKey: apiKey as string });
// Fix: steps 4 is for schnell; 28 is for dev.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

width: 1024,
height: 1024,
count: 1,
...(options.width !== undefined ? { width: options.width || 1024 } : {}),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of !== undefined you probably want to do != null which checks for undefined or null

@monilpat
Copy link
Collaborator

monilpat commented Dec 2, 2024

As well as address the CI linter failure and add a test plan if you can thanks !

@lalalune lalalune merged commit 2a9010e into elizaOS:main Dec 2, 2024
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants