Skip to content

Conversation

@thibauult
Copy link
Member

Summary

  • Add support for the beta attribute on the <messageML> tag, as introduced in messageml-utils PR #421
  • This enables experimental features like <sym-ai-context> for Symphony AI integration
  • When beta=true, messages are wrapped with <messageML beta="true"> instead of <messageML>

Test plan

  • checkBetaModeNotAddedByDefault() - verifies default behavior has no beta attribute
  • checkBetaModeAddedWhenTrue() - verifies beta="true" is added when set
  • checkBetaModeNotAddedWhenFalse() - verifies no beta attribute when explicitly set to false
  • checkBetaTrueWithPreWrappedContentThrowsException() - verifies exception when beta=true but content already wrapped without beta
  • checkBetaTrueWithPreWrappedBetaContentAllowed() - verifies content with <messageML beta="true"> is accepted

Usage Example

Message message = Message.builder()
    .content("<sym-ai-context>...</sym-ai-context>")
    .beta(true)
    .build();
// Results in: <messageML beta="true"><sym-ai-context>...</sym-ai-context></messageML>

Add support for the beta attribute on the <messageML> tag, as introduced
in messageml-utils PR finos#421. This enables experimental features like
<sym-ai-context> for Symphony AI integration.

Changes:
- Add beta field to Message class and MessageBuilder
- When beta=true, wrap content with <messageML beta="true">
- Throw MessageCreationException if beta=true but content is already
  wrapped without the beta attribute
- Add unit tests for all beta mode scenarios
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

Successfully merging this pull request may close these issues.

1 participant