Skip to content

Add builder pattern to AssistantMessage and ToolResponseMessage #3243

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

JM-Lab
Copy link
Contributor

@JM-Lab JM-Lab commented May 18, 2025

Unlike UserMessage and SystemMessage, AssistantMessage and ToolResponseMessage did not support the builder pattern. This PR applies the builder pattern to these classes for consistent and flexible object creation.
Additionally, the properties field in AssistantMessage has been renamed to metadata for consistency with other message types.

  • Refactor affected usages after AssistantMessage and ToolResponseMessage update
  • Added builder pattern to AssistantMessage and ToolResponseMessage.
  • Renamed the properties field to metadata in AssistantMessage for improved semantic clarity and consistency.

@JM-Lab JM-Lab changed the title Add missing meAdded builder pattern to AssistantMessage and ToolResponseMessage for clarity and flexibilityssage builder Added builder pattern to AssistantMessage and ToolResponseMessage for clarity and flexibility. May 19, 2025
@JM-Lab JM-Lab changed the title Added builder pattern to AssistantMessage and ToolResponseMessage for clarity and flexibility. Added builder pattern to AssistantMessage and ToolResponseMessage May 20, 2025
@JM-Lab JM-Lab changed the title Added builder pattern to AssistantMessage and ToolResponseMessage Add builder pattern to AssistantMessage and ToolResponseMessage May 20, 2025
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