go-anthropic
go-anthropic copied to clipboard
Multi system message constructor, and types for model + chat roles.
While using this library, I found myself using NewXXXTextMessage
, NewUserImageMessage
a lot, but wondered why there was no similar constructor for multi-system messages.
This PR adds this functionality with a test.
This PR also adds a type for model names and chat roles, since both of them were plain strings. It's just a string, so it doesn't offer any "protection", but is nice for sanity checking while writing code / reasoning about correctness.