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

refactor: Add message container to payload #119

Merged
merged 1 commit into from
Apr 23, 2024
Merged

Conversation

fabriziodemaria
Copy link
Member

No description provided.

.putAllFields(message.orElse(ConfidenceValue.Struct.EMPTY).asProtoMap())
.putFields(CONTEXT, context.toProto()));
.putAllFields(context.asProtoMap())
.putFields("message", message.orElse(ConfidenceValue.Struct.EMPTY).toProto()));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll assume this sends an empty message struct on absent messages. That's fine, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking it is better this way, as we ensure the message key is always reserved and not just overriding contexts if message has fields

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree 👍

@fabriziodemaria fabriziodemaria merged commit 176dec1 into main Apr 23, 2024
3 checks passed
@fabriziodemaria fabriziodemaria deleted the message-container branch April 23, 2024 14:49
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.

2 participants