feat: Refactor LiquidChatMessage and update project references#278
Merged
lucianareginalino merged 1 commit intomainfrom Jul 28, 2025
Merged
feat: Refactor LiquidChatMessage and update project references#278lucianareginalino merged 1 commit intomainfrom
lucianareginalino merged 1 commit intomainfrom
Conversation
- Changed `Role` property in `LiquidChatMessage` to use the new `LiquidMessageRole` enum for better structure. - Added constructor for `LiquidChatMessage` and initialized `Content` to an empty array by default. - Introduced `AddContent(string text)` and `AddContent(Uri imageUri)` methods for adding content with validation. - Added `AddMessage(LiquidChatMessage message)` method in `LiquidChatMessages` to ensure null messages are not added. - Updated project version in `Liquid.Core.csproj` from `8.0.0` to `8.1.0`. - Changed `Liquid.Core` reference in `Liquid.GenAi.OpenAi.csproj` from a package reference to a project reference. - Updated `MapChatRequestMessage` method to use the new `LiquidMessageRole` enum. - Created `LiquidMessageRole.cs` to define the `LiquidMessageRole` enum for message participant roles.
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Roleproperty inLiquidChatMessageto use the newLiquidMessageRoleenum for better structure.LiquidChatMessageand initializedContentto an empty array by default.AddContent(string text)andAddContent(Uri imageUri)methods for adding content with validation.AddMessage(LiquidChatMessage message)method inLiquidChatMessagesto ensure null messages are not added.Liquid.Core.csprojfrom8.0.0to8.1.0.Liquid.Corereference inLiquid.GenAi.OpenAi.csprojfrom a package reference to a project reference.MapChatRequestMessagemethod to use the newLiquidMessageRoleenum.LiquidMessageRole.csto define theLiquidMessageRoleenum for message participant roles.