Files
AkiKurisu 9691c9c271 .NET: Fix role assignment in ChatMessage construction (#4290)
* Use actual message role when creating ChatMessage

Replace hard-coded ChatRole.User with a ChatRole constructed from the message's Role. The change ensures ToChatMessage and FunctionMessage use the original role (new ChatRole(this.Role)) for both text and contents branches, fixing incorrect role assignment when constructing ChatMessage instances.

* Update changes

* Fix formatting in ToChatMessage tests

---------

Co-authored-by: Roger Barreto <19890735+rogerbarreto@users.noreply.github.com>
9691c9c271 ยท 2026-03-26 16:13:00 +00:00
History
..