Skip to content

Conversation

@Phoenix500526
Copy link
Contributor

@Phoenix500526 Phoenix500526 commented Dec 25, 2025

  • Add ToolResultReviewer trait with critique() method returning the final output
  • Extend PromptRequest with generic parameter R and with_reviewer() builder
  • Only critique successful tool executions; skip on failure
  • Reviewer controls the final output format (useful for JSON tool results)
  • Add example demonstrating usage with a small model reviewer

Closes: #1191

- Add `ToolResultReviewer` trait with `critique()` method returning the final output
- Extend `PromptRequest` with generic parameter `R` and `with_reviewer()` builder
- Only critique successful tool executions; skip on failure
- Reviewer controls the final output format (useful for JSON tool results)
- Add example demonstrating usage with a small model reviewer

Signed-off-by: Jiawei Zhao <[email protected]>
- Add reviewer generic parameter and field to StreamingPromptRequest
- Add with_reviewer() builder method
- Invoke critique() after successful tool execution in streaming flow

Signed-off-by: Jiawei Zhao <[email protected]>
@Phoenix500526 Phoenix500526 marked this pull request as draft December 30, 2025 14: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.

feat: Add ToolResultReviewer trait for critiquing open-ended tool results

1 participant