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

Add magic command to create aliases for AI models #45

Closed
JasonWeill opened this issue Apr 7, 2023 · 0 comments · Fixed by #136
Closed

Add magic command to create aliases for AI models #45

JasonWeill opened this issue Apr 7, 2023 · 0 comments · Fixed by #136
Assignees
Labels
enhancement New feature or request @jupyter-ai/magics
Milestone

Comments

@JasonWeill
Copy link
Collaborator

JasonWeill commented Apr 7, 2023

Problem

Currently, some AI models have aliases. For example, gpt2 is an alias for huggingface_hub:gpt2. These are defined in a constant in our Python code:

MODEL_ID_ALIASES = {
"gpt2": "huggingface_hub:gpt2",
"gpt3": "openai:text-davinci-003",
"chatgpt": "openai-chat:gpt-3.5-turbo",
"gpt4": "openai-chat:gpt-4",
}

To add a new alias, one would have to modify the file above and make a new release of Jupyter AI for everyone. There are no aliases for local usage.

Proposed Solution

Add a command %%ai alias <name> <value> to create custom aliases. These aliases persist for as long as the kernel remains running.

Add a command such as %%ai alias list that shows users which aliases they have defined. %%ai list (#28) may also display these aliases.

Update the example notebooks and documentation with information about this new command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request @jupyter-ai/magics
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants