Skip to content

Refactor Generate function to remove redundant condition and improve payload handling#30

Open
ANUBprad wants to merge 1 commit intorae-app:mainfrom
ANUBprad:fix/generate-cleanup
Open

Refactor Generate function to remove redundant condition and improve payload handling#30
ANUBprad wants to merge 1 commit intorae-app:mainfrom
ANUBprad:fix/generate-cleanup

Conversation

@ANUBprad
Copy link
Copy Markdown

The previous implementation had an if/else block where both branches executed identical API calls, resulting in dead code.

This refactor:

  1. Removes the redundant conditional
  2. Keeps a single request flow
  3. Includes image and tool fields only when relevant

This improves readability and avoids sending unnecessary data while preserving existing behavior.

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.

1 participant