-
Notifications
You must be signed in to change notification settings - Fork 513
Open
Labels
Description
- I have looked for existing issues (including closed) about this
Feature Request
We should have a way to validate that a struct validates all arbitrary requirements without leaving the extractor retry loop.
We should also have a way to add introspection to the extractor (like prompt hooks).
Motivation
Increase DX, observability... etc
Proposal
Something like the below:
trait ExtractorHook: Clone + Send + Sync {
// .. some methods
}
trait ExtractorValidatorHook: Clone + Send + Sync {
fn validate() -> impl Future<Output = Result<String, Error>>;
}
I wonder if it would be a good idea for us to attach the error as a tool result back to the conversation if we are unable to meet the requirements.