Skip to content

Make ISO 8601 date parsing more flexible - #67

Merged
mattt merged 1 commit into
mainfrom
mattt/relax-date-formatting
May 12, 2025
Merged

Make ISO 8601 date parsing more flexible#67
mattt merged 1 commit into
mainfrom
mattt/relax-date-formatting

Conversation

@mattt

@mattt mattt commented May 12, 2025

Copy link
Copy Markdown
Owner

I noticed that some tool calls were failing because the model was providing timestamps that ISO8601DateFormatter didn't like. In this case, the problem was omitting fractional seconds, but in general, we should be a lot more flexible about accepting reasonable values.

This PR introduces an extension on that class to try a bunch of different formats and pick the first one that works. With these changes, I haven't seen tool use fail because of timestamp format pedantry.

@mattt
mattt merged commit bc5d1fe into main May 12, 2025
@mattt
mattt deleted the mattt/relax-date-formatting branch May 12, 2025 18:56
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