-
Notifications
You must be signed in to change notification settings - Fork 49
feat: MelleaSession.register for functional interface and MelleaSession.powerup for dynamic mixin (register all methods in a class) #224
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
base: main
Are you sure you want to change the base?
Conversation
Merge ProtectionsYour pull request matches the following merge protections and will not be merged until they are valid. 🟢 Enforce conventional commitWonderful, this rule succeeded.Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
|
e3a996d to
98703d1
Compare
98703d1 to
83b699a
Compare
jakelorocco
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if these are just issues with my type-hinter / the default one in VSCode.
It may not be possible to dynamically create these methods while retaining basic intellisense and type hinting.
| DOCS = { | ||
| # from `act` | ||
| "action": "the Component from which to generate.", | ||
| "context": "the context being used as a history from which to generate the response.", | ||
| "backend": "the backend used to generate the response.", | ||
| # "requirements": "used as additional requirements when a sampling strategy is provided.", | ||
| "strategy": "a SamplingStrategy that describes the strategy for validating and repairing/retrying for the instruct-validate-repair pattern. None means that no particular sampling strategy is used.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| MelleaSession.register(mfuncs.act) | ||
| MelleaSession.register(mfuncs.instruct) | ||
| MelleaSession.register(mfuncs.chat) | ||
| MelleaSession.register(mfuncs.validate, set_context=False) | ||
| MelleaSession.register(mfuncs.query) | ||
| MelleaSession.register(mfuncs.transform) | ||
|
|
||
| MelleaSession.register(mfuncs.aact) | ||
| MelleaSession.register(mfuncs.ainstruct) | ||
| MelleaSession.register(mfuncs.achat) | ||
| MelleaSession.register(mfuncs.avalidate, set_context=False) | ||
| MelleaSession.register(mfuncs.aquery) | ||
| MelleaSession.register(mfuncs.atransform) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This bricks all type-hinting / intellisense for me in VSCode. I don't even see m.instruct or m.<>.

No description provided.