WIP: Introduce a new ell.interactive API and example.#254
Draft
kwlzn wants to merge 7 commits intoMadcowD:mainfrom
Draft
WIP: Introduce a new ell.interactive API and example.#254kwlzn wants to merge 7 commits intoMadcowD:mainfrom
kwlzn wants to merge 7 commits intoMadcowD:mainfrom
Conversation
Owner
|
I love this have you seen: https://github.com/MadcowD/ell/blob/main/docs/ramblings/0.1.0/chat.md |
Contributor
Author
no, but thanks for the pointer! this definitely helps illuminate the versioning story and top level API alignment stuff. some changes I'll make based on this:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This introduces
ell.interactive(), a new experimental API helper for bi-directional interaction with an LMP which can be used for various interactive scenarios w/ append-mode contextual history. It uses python's context manager paradigm to provide a session-like object that accumulates all message types (system, user, assistant and tool call/results w/ eager mode execution) - where the user only has to worry about examining the last response and sending the next one rather than managing that themselves.The basic idea is that instead of defining a minimal
@ell.complexmethod and calling it repeatedly with an externally managed messages list like in the multi-step tool example to achieve dynamicism, you can just do something like:I haven't thought too much about tracking/versioning nor have I tested it inside
ell studioyet, but wanted to float the idea eagerly via a WIP PR for feedback/thoughts/guidance on how best to proceed in alignment with the projects goals.Feedback welcome!
btw, I run the demo with uv like so: