Skip to content

Commit

Permalink
feat: added env var KONTEXT_COPILOT_DEFAULT_SYS_PROMPT to set differe… (
Browse files Browse the repository at this point in the history
#50)

* feat: added env var KONTEXT_COPILOT_DEFAULT_SYS_PROMPT to set different system propmt.

* docs: added codeowners for pr review.
  • Loading branch information
tang2087 authored Sep 10, 2024
1 parent ddd7765 commit 87f5c3d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@kontext-tech/kontext-copilot-reviewer
2 changes: 1 addition & 1 deletion kontext_copilot/copilot/_prompt_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def create_system_prompt(
logger.info("Creating system prompt for data source: %s", data_source.name)

prompt_model = PromptFactory.get_prompt_template_by_id(
"system-prompt-da-metadata"
os.getenv("KONTEXT_COPILOT_DEFAULT_SYS_PROMPT", "system-prompt-da-metadata")
)

logger.debug("Prompt template: %s", prompt_model)
Expand Down
8 changes: 8 additions & 0 deletions kontext_copilot/copilot/prompts.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@
"user_input": null,
"system_defined": true
},
{
"id": "system-prompt-da-metadata-refined",
"name": "System Prompt - Data Analytics (using Metadata)",
"prompt": null,
"system_prompt": "./prompts/system-prompt-da-metadata-refined.md",
"user_input": null,
"system_defined": true
},
{
"id": "sentiment-analysis",
"name": "Sentiment Analysis",
Expand Down

0 comments on commit 87f5c3d

Please sign in to comment.