tghamm / Anthropic.SDK

An unofficial C#/.NET SDK for accessing the Anthropic Claude API
https://www.nuget.org/packages/Anthropic.SDK
MIT License
55 stars 10 forks source link

Role is still of type string in MessageResponse and StreamMessage classes #31

Closed sibbl closed 4 months ago

sibbl commented 4 months ago

Hi,

thanks a lot for all the recent refactoring to support functions! I just updated my code base and found the following inconsistency:

While most Role properties changed from string to RoleType, the Role properties in the MessageResponse and StreamMessage classes are still of type string.

As I suppose the values can also just be "user" or "assistant", the RoleType enum could be used there as well, couldn't it?

As a workaround, I now have my own comparison utility.

tghamm commented 4 months ago

Correct - simple oversight, I'll have a release out in a couple of hours to address this. Thanks for the feedback @sibbl!

tghamm commented 4 months ago

New version is out! Thanks again.

sibbl commented 4 months ago

Thanks for the very fix reply and fix!