go-anthropic icon indicating copy to clipboard operation
go-anthropic copied to clipboard

Multi system message constructor, and types for model + chat roles.

Open WillMatthews opened this issue 6 months ago • 1 comments

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.

WillMatthews avatar Aug 22 '24 02:08 WillMatthews