Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat(examples) Add example: SA with Message API preview #4982

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

panh99
Copy link
Contributor

@panh99 panh99 commented Mar 1, 2025

No description provided.

Comment on lines +45 to +55
rs = sa_aggregator.aggregate(
[
driver.create_message(
content=RecordSet(), # Empty message
message_type=MessageType.QUERY,
dst_node_id=nid,
group_id="",
)
for nid in nids
]
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
rs = sa_aggregator.aggregate(
[
driver.create_message(
content=RecordSet(), # Empty message
message_type=MessageType.QUERY,
dst_node_id=nid,
group_id="",
)
for nid in nids
]
)
record = RecordSet() # Empty message
rs = sa_aggregator.aggregate(
[
driver.create_message(
content=record
message_type=MessageType.QUERY,
dst_node_id=nid,
group_id="",
)
for nid in nids
]
)

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's say we want to put the same content in all messages. It would normal to define first the RecordSet and then pass it to the create_message() method. however, this wont' work with SA. Triggering errors in the form "cryptography.fernet.InvalidToken"

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants