Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
sibbl opened this issue Apr 25, 2024 · 3 comments
Closed

Comments

@sibbl
Copy link

sibbl commented Apr 25, 2024

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
Copy link
Owner

tghamm commented Apr 25, 2024

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

tghamm added a commit that referenced this issue Apr 25, 2024
tghamm added a commit that referenced this issue Apr 25, 2024
Ensures Role is returned as Enum #31
@tghamm
Copy link
Owner

tghamm commented Apr 25, 2024

New version is out! Thanks again.

@tghamm tghamm closed this as completed Apr 25, 2024
@sibbl
Copy link
Author

sibbl commented Apr 25, 2024

Thanks for the very fix reply and fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants