-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Let the user add their own system prompts (#643)
* feat: Let the user add their own system prompts Related: #454 This PR is not ready yet. For the moment it adds the system prompts to DB and associates it to a workspace. It's missing to use the system prompt and actually send it to the LLM * Finished functionality to add wrkspace system prompt * separated into it's own command system-prompt * Raise WorkspaceDoesNotExistError on update system-prompt * Added show system-prompt command * comment changes * unit test fixes * added some docstrings and mentioned dashboard
- Loading branch information
1 parent
28af062
commit c35d3b1
Showing
9 changed files
with
342 additions
and
47 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
migrations/versions/a692c8b52308_add_workspace_system_prompt.py
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,26 @@ | ||
"""add_workspace_system_prompt | ||
Revision ID: a692c8b52308 | ||
Revises: 5c2f3eee5f90 | ||
Create Date: 2025-01-17 16:33:58.464223 | ||
""" | ||
|
||
from typing import Sequence, Union | ||
|
||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision: str = "a692c8b52308" | ||
down_revision: Union[str, None] = "5c2f3eee5f90" | ||
branch_labels: Union[str, Sequence[str], None] = None | ||
depends_on: Union[str, Sequence[str], None] = None | ||
|
||
|
||
def upgrade() -> None: | ||
# Add column to workspaces table | ||
op.execute("ALTER TABLE workspaces ADD COLUMN system_prompt TEXT DEFAULT NULL;") | ||
|
||
|
||
def downgrade() -> None: | ||
op.execute("ALTER TABLE workspaces DROP COLUMN system_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
Oops, something went wrong.