-
Notifications
You must be signed in to change notification settings - Fork 85
[GuideLLM Refactor] Multi-Turn Rework #374
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
base: features/refactor/base-draft
Are you sure you want to change the base?
[GuideLLM Refactor] Multi-Turn Rework #374
Conversation
@SchedulerMessagingPydanticRegistry.register() | ||
class ScheduledRequestAugmentation(StandardBaseModel): | ||
""" | ||
Adjustments to scheduler logic for a paired request. | ||
""" | ||
|
||
post_requeue_delay: float = Field( | ||
description=( | ||
"Delay in seconds to wait after a request to " | ||
"queue the next request in the conversation." | ||
), | ||
default=0.0, | ||
) | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be a part of ScheduledRequestInfo
but I figured it was not really necessary to pass it back and forth with each request update. Plus I thought this would be a good interface for adjusting the scheduling of individual requests.
def _apply_history( | ||
self, | ||
request: GenerationRequest, | ||
history: HistoryT[GenerationRequest, GenerationResponse], | ||
) -> GenerationRequest: | ||
""" | ||
Apply conversation history to the current request. | ||
""" | ||
|
||
def turn_to_text(turn: tuple[GenerationRequest, GenerationResponse]) -> str: | ||
req, res = turn | ||
return f"{req.content}{res.value}" | ||
|
||
request.content = "".join(chain(map(turn_to_text, history), (request.content,))) | ||
return request | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Temporary hack until we land request templates.
4c4ea5d
to
aa81de8
Compare
## Summary <!-- Include a short paragraph of the changes introduced in this PR. If this PR requires additional context or rationale, explain why the changes are necessary. --> ## Details <!-- Provide a detailed list of all changes introduced in this pull request. --> - [ ] ## Test Plan <!-- List the steps needed to test this PR. --> - ## Related Issues <!-- Link any relevant issues that this PR addresses. --> - Resolves # --- - [x] "I certify that all code in this PR is my own, except as noted below." ## Use of AI - [ ] Includes AI-assisted code completion - [ ] Includes code generated by an AI application - [ ] Includes AI-generated tests (NOTE: AI written tests should have a docstring that includes `## WRITTEN BY AI ##`)
Signed-off-by: Samuel Monson <smonson@redhat.com>
Signed-off-by: Samuel Monson <smonson@redhat.com>
Signed-off-by: Samuel Monson <smonson@redhat.com>
Signed-off-by: Samuel Monson <smonson@redhat.com>
Signed-off-by: Samuel Monson <smonson@redhat.com>
Signed-off-by: Samuel Monson <smonson@redhat.com>
Signed-off-by: Samuel Monson <smonson@redhat.com>
Signed-off-by: Samuel Monson <smonson@redhat.com>
Signed-off-by: Samuel Monson <smonson@redhat.com>
Signed-off-by: Samuel Monson <smonson@redhat.com>
9ae0532
to
cd43b2c
Compare
Summary
Details
Test Plan
Related Issues
Use of AI
## WRITTEN BY AI ##
)