-
Notifications
You must be signed in to change notification settings - Fork 19.8k
Update String Evaluator #6615
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
Update String Evaluator #6615
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
78e2b33 to
b1b9b16
Compare
nfcampos
left a comment
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.
looks good
| _SUPPORTED_CRITERIA.update(d) | ||
|
|
||
|
|
||
| class CriteriaEvalChain(LLMChain): |
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.
Why don't we make this subclass StringEvaluator?
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.
Because it's a protocol and the metaclass differs from the chain. We could also make it just StringEvaluatorChain, which would probably be more conventional in langchain. I'll go ahead and do that
| _SUPPORTED_CRITERIA.update(d) | ||
|
|
||
|
|
||
| def get_criteria_evaluator( |
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.
Q: instead of having this method here, can we just have an to_run_evaluator method on StringEvaluator that could convert any arbitrary StringEvaluator into a RunEvaluator (which expects a Run)?
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.
Hmmmm yeah we could
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.
Think I'd do in a subsequent PR
79f8d13 to
bdd6116
Compare
bdd6116 to
fd82f46
Compare
evaluate_strings