Skip to content

Refactor to remove skip_system from LLMModel.run_prompt #680

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

Merged
merged 1 commit into from
Nov 13, 2024

Conversation

jamesbraza
Copy link
Collaborator

When reading through our various control flows here, I found the presence of a system prompt coupled with a skip_system flag to add more thought and complexity. We don't need to cart around two separate pieces of information here, we can just make system_prompt be an optional variable and one source of truth.

This PR is a refactor that removes skip_system in favor of bool checks directly on system_prompt. Yes it's a breaking change, but I don't think our LLMModel implementation is really imported and used by our users.

@jamesbraza jamesbraza added the enhancement New feature or request label Nov 13, 2024
@jamesbraza jamesbraza self-assigned this Nov 13, 2024
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Nov 13, 2024
Copy link
Collaborator

@mskarlin mskarlin left a comment

Choose a reason for hiding this comment

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

👍 nice refactor

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Nov 13, 2024
@jamesbraza jamesbraza merged commit 9b53817 into main Nov 13, 2024
5 checks passed
@jamesbraza jamesbraza deleted the no-skip-system branch November 13, 2024 22:04
maykcaldas added a commit that referenced this pull request Nov 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants