-
Notifications
You must be signed in to change notification settings - Fork 46
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
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
- Loading branch information
1 parent
c6d8a30
commit 9c2bb6f
Showing
5 changed files
with
82 additions
and
4 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
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,27 @@ | ||
"""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 | ||
import sqlalchemy as sa | ||
|
||
|
||
# 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
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