-
Notifications
You must be signed in to change notification settings - Fork 371
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Keyboard shortcut to show schema hints (cmd+S / ctrl+S -- note that is a capital "S" so the full kbd commands is cmd+shift+s) * DB-managed LLM prompts (editable in django admin) * Versioned .js bundles (for cache busting) * Automatically populate assistant responses that contain code into the editor * `#616`_: Update schema/assistant tables/autocomplete on connection drop-down change
- Loading branch information
1 parent
d0398c2
commit 32a2419
Showing
18 changed files
with
265 additions
and
81 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Generated by Django 4.2.8 on 2024-04-26 13:05 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
def insert_assistant_prompt(apps, schema_editor): | ||
|
||
ExplorerValue = apps.get_model('explorer', 'ExplorerValue') | ||
ExplorerValue.objects.get_or_create( | ||
key="ASP", | ||
value="""You are a data analyst's assistant and will be asked write or modify a SQL query to assist a business | ||
user with their analysis. The user will provide a prompt of what they are looking for help with, and may also | ||
provide SQL they have written so far, relevant table schema, and sample rows from the tables they are querying. | ||
For complex requests, you may use Common Table Expressions (CTEs) to break down the problem into smaller parts. | ||
CTEs are not needed for simpler requests. | ||
""" | ||
) | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('explorer', '0015_explorervalue'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='explorervalue', | ||
name='key', | ||
field=models.CharField(choices=[('UUID', 'Install Unique ID'), ('SMLS', 'Startup metric last send'), ('ASP', 'System prompt for SQL Assistant')], max_length=5, unique=True), | ||
), | ||
migrations.RunPython(insert_assistant_prompt), | ||
] |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.