The original post uses "github.com/anthropics/anthropic-sdk-go", the Ruby uses a different library, does it not? If they are two different libraries, then the comparison does not make too much sense.
I always put extra effort into trying to make my blog posts shorter without sacrificing the quality. I think good technical writing should transfer the knowledge while requesting the least amount of time possible from the reader.