-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Harrison/datetime parser #4693
Harrison/datetime parser #4693
Conversation
|
||
def get_format_instructions(self) -> str: | ||
examples = comma_list(_generate_random_datetime_strings(self.format)) | ||
return f"""Write a datetime string that matches the |
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.
I wonder whether it makes sense to ask for an ISO-8601 format. No idea what llms handle :)
from langchain.utils import comma_list | ||
|
||
|
||
def _generate_random_datetime_strings( |
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 is this not a hard-coded pattern or at least using a seed?
|
||
# Test invalid input | ||
try: | ||
sleep(0.001) |
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.
we should use freeze gun here, should avoid sleep
in tests at all costs
Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
Co-authored-by: Jacob Valdez <jacobfv@msn.com> Co-authored-by: Jacob Valdez <jacob.valdez@limboid.ai> Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
Co-authored-by: Jacob Valdez <jacobfv@msn.com> Co-authored-by: Jacob Valdez <jacob.valdez@limboid.ai> Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
No description provided.