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

Initial base.py for message broker agent-state-encapsulation #3831

Merged

Conversation

rihp
Copy link
Collaborator

@rihp rihp commented May 5, 2023

Background

Changes

Documentation

Test Plan

PR Quality Checklist

  • My pull request is atomic and focuses on a single change.
  • I have thoroughly tested my changes with multiple different prompts.
  • I have considered potential risks and mitigations for my changes.
  • I have documented my changes clearly and comprehensively.
  • I have not snuck in any "extra" small tweaks changes

@vercel
Copy link

vercel bot commented May 5, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
docs ⬜️ Ignored (Inspect) May 6, 2023 4:33pm

@github-actions github-actions bot added the size/m label May 5, 2023
@p-i- p-i- added the re-arch label May 5, 2023

class MessageCategory(Enum):
Copy link
Contributor

Choose a reason for hiding this comment

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

The distinction between message category and role seems fuzzy. Ie can a user only send USER_INPUT messages? can the SYSTEM/ASSISTANT send anything but USER_PROMPT?

pass

@dataclasses.dataclass
class Message(ABC): # ABC should be within parentheses
Copy link
Contributor

Choose a reason for hiding this comment

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

Recall that we've got a message struct elsewhere. It's good not to pollute our own types namespace. We should rename one or both of these (probably keep this one and rename the other, but interested to hear other opinions)

message: str
kind_of_message: MessageCategory

class MessageBroker(ABC):
Copy link
Contributor

Choose a reason for hiding this comment

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

This still needs some discussion and work I think.

Copy link
Contributor

Choose a reason for hiding this comment

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

It also has the fuzziest scope. We maybe leave this PR til the end of the abstractions since its the most new feature kind of thing we're adding and it'll be easier to think about with the other systems resolved.

@collijk collijk self-assigned this May 5, 2023
@anonhostpi
Copy link

What does this do? Is this an abstraction of a prompt handler?

@github-actions github-actions bot added size/l and removed size/m labels May 6, 2023
@rihp
Copy link
Collaborator Author

rihp commented May 6, 2023

What does this do? Is this an abstraction of a prompt handler?

It's an interface for the message broker @anonhostp

@collijk collijk merged commit 2afe06a into Significant-Gravitas:agent-state-encapsulation May 7, 2023
3 checks passed
@anonhostpi
Copy link

anonhostpi commented May 7, 2023

Hmmm, I'm guessing I'm unsure what the "message broker" is. It sounds like an object that controls sending messages back and forth between the APIs.

I guess I'll figure out what it actually does in a bit, once I'm done scrubbing the repo. Just wanted to see if I could probe your knowledge a bit now, but thank you though!

@Boostrix
Copy link
Contributor

Boostrix commented May 7, 2023

it's for the inter-agent messaging API - which currently is NOT yet an API ...I wanted to use that, when I learnt that isn't even yet a proper encapsulated API - so that's probably what they're now working on fixing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

5 participants