Decouple tasks from model engines and introduce modalities #15
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.
Demo
Screen.Recording.2023-03-13.at.6.18.48.PM.mov
Description
Decouples tasks from model engines by introducing the concept of modalities. Defined loosely, they can be thought of as representing the input and output types for a model.
txt2txt
: accepts an English text prompt and generates English text that roughly corresponds to the prompttxt2img
: accepts an English text prompt and generates an image that roughly corresponds to the promptModel engines now must declare what modalities they support as a class attribute. This is simply a list of modality IDs, for example:
text-to-captioned-image
. This is because this model has two output types, and its modality is not described bytxt2txt
ortxt2img
.jupyter_ai.default_tasks
.DescribeTask
API response now includes a list of valid model engines that support the modality of a given task. Very useful 😁id
.name
is now reserved for a model engine's human readable name, e.g. "ChatGPT".Notes
You need to delete the SQLite DB at
~/.local/share/jupyter/ai_task_manager.db
.Other fixes