Skip to content

Conversation

sjmonson
Copy link
Collaborator

Summary

Details

  • [ ]

Test Plan

Related Issues

  • Resolves #

  • "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 ##)

Comment on lines +85 to +99
@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,
)


Copy link
Collaborator Author

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.

Comment on lines +502 to +517
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

Copy link
Collaborator Author

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.

@sjmonson sjmonson force-pushed the features/refactor/base-draft branch from 4c4ea5d to aa81de8 Compare September 30, 2025 15:19
## 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>
@sjmonson sjmonson force-pushed the features/refactor/multiturn branch from 9ae0532 to cd43b2c Compare September 30, 2025 15:39
@sjmonson sjmonson marked this pull request as ready for review September 30, 2025 18:26
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