fix: dont use milliseconds or microseconds because boto3 doesnt suppo… #83
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Users observed that sometimes timestamps can be overlapping, causing out of order tool events. So, the fix is to increment the timestamp counter. I ran the problematic script 10 times in a row and did not have the issue once. Also, notice that boto3 (yes, the boto3 client, not the service) only resolves timestamps at 1 second resolution. So that is why I am incrementing at the 1 second level.
Testing
I ran the below script
test.pyasfor i in {1..10}; do python test.py; donebefore the fix, this gave a validation error from the Converse API about tool use and tool result being out of order. But now that never happens.