-
-
Notifications
You must be signed in to change notification settings - Fork 325
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
Register, update, and delete aliases #136
Conversation
409370e
to
551f534
Compare
Updates PR to add support for registering names for custom LangChain chains. |
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.
Thank you for the monumental effort you've put into this! Awesome work. I have two main concerns:
-
Let's get alignment on the syntax. I'm not really sure if we want to be using the same subcommands to register aliases and chains. Chains and aliases are different and should be registered/updated/deleted differently.
-
Right now, we are handling the implementation and parsing imperatively rather than relying on
argparse
. This strategy is often brittle, based on the simple fact that string parsing is easy to get wrong. I would like to work with you on this.
5a9be92
to
a25457c
Compare
a25457c
to
b194df2
Compare
This pull request is now updated to incorporate the |
6a62990
to
6ca61c0
Compare
c19b58c
to
306955b
Compare
@JasonWeill |
Per discussion with @ellisonbg and @3coins earlier today: We're going to retain the single set of commands for registering, updating, and deleting aliases to both models and chains. Both models and chains are invoked in the same way, without additional arguments. This also sets us up for future invocation methods, such as by registering an alias to a named Python function, if we want to do so later. Using fewer commands is easier to learn and remember. |
Co-authored-by: Piyush Jain <piyushjain@duck.com>
Co-authored-by: Piyush Jain <piyushjain@duck.com>
* Validates registry name * WIP: Register alias * Raises exceptions * Refactors, adds delete and update commands * Additional examples * Update sample notebook * Update docs * List aliases * Refactoring * Recommends using 'update' command * WIP: Gets variable from user namespace, tests whether it's a chain * Updates sample workbook, calls custom chain * Updates user docs for aliases * Edits sample notebook * Alias list in text display, updates messaging * Updates sample workbook * Updates sample notebook, parsers to use click * Additional cleanup * Updates sample notebook, removes unahppy case * Fix error from rebase, updates sample notebook * Fixed error when --format is used * Update docs/source/users/index.md Co-authored-by: Piyush Jain <piyushjain@duck.com> * Update docs/source/users/index.md Co-authored-by: Piyush Jain <piyushjain@duck.com> * Wraps ValueError exceptions to not print stack trace --------- Co-authored-by: Piyush Jain <piyushjain@duck.com>
* Validates registry name * WIP: Register alias * Raises exceptions * Refactors, adds delete and update commands * Additional examples * Update sample notebook * Update docs * List aliases * Refactoring * Recommends using 'update' command * WIP: Gets variable from user namespace, tests whether it's a chain * Updates sample workbook, calls custom chain * Updates user docs for aliases * Edits sample notebook * Alias list in text display, updates messaging * Updates sample workbook * Updates sample notebook, parsers to use click * Additional cleanup * Updates sample notebook, removes unahppy case * Fix error from rebase, updates sample notebook * Fixed error when --format is used * Update docs/source/users/index.md Co-authored-by: Piyush Jain <piyushjain@duck.com> * Update docs/source/users/index.md Co-authored-by: Piyush Jain <piyushjain@duck.com> * Wraps ValueError exceptions to not print stack trace --------- Co-authored-by: Piyush Jain <piyushjain@duck.com>
* Validates registry name * WIP: Register alias * Raises exceptions * Refactors, adds delete and update commands * Additional examples * Update sample notebook * Update docs * List aliases * Refactoring * Recommends using 'update' command * WIP: Gets variable from user namespace, tests whether it's a chain * Updates sample workbook, calls custom chain * Updates user docs for aliases * Edits sample notebook * Alias list in text display, updates messaging * Updates sample workbook * Updates sample notebook, parsers to use click * Additional cleanup * Updates sample notebook, removes unahppy case * Fix error from rebase, updates sample notebook * Fixed error when --format is used * Update docs/source/users/index.md Co-authored-by: Piyush Jain <piyushjain@duck.com> * Update docs/source/users/index.md Co-authored-by: Piyush Jain <piyushjain@duck.com> * Wraps ValueError exceptions to not print stack trace --------- Co-authored-by: Piyush Jain <piyushjain@duck.com>
Fixes #45 and #46.
Adds
%ai register
,%ai delete
, and%ai update
commands to manage aliases. Modifies%ai list
to display aliases. Reclassifies shortcut AI model aliases as a default set. Modifies magic command logic to use the alias dictionary. Updates sample notebook and documentation.Users can set aliases to models (but not to other aliases), and to variables of type
LLMChain
.