Skip to content

Commit

Permalink
Merge branch 'main' into 15-add-data-sources---csv-parquet
Browse files Browse the repository at this point in the history
  • Loading branch information
tang2087 authored Sep 11, 2024
2 parents ef8b9a3 + 54a47a7 commit 2e2ddd0
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## v0.5.0 (2024-09-10)

### Feat

- added env var KONTEXT_COPILOT_DEFAULT_SYS_PROMPT to set differe… (#50)

## v0.4.0 (2024-09-09)

### Feat
Expand Down
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
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

Kontext Copilot is an AI empowered assistant for data analytics that runs on your local computer.

![kontext-copilot-example](https://cdn.kontext.tech/Images/ai/kontext-copilot-light.gif)

## Prerequisites

- Python 3.9+
Expand All @@ -27,7 +29,9 @@ Kontext Copilot is still at early stage. Please follow the guide below to evalua

[**Get started with Kontext Copilot**](https://kontext.tech/article/1386/get-started-with-kontext-copilot)

![kontext-copilot-example](https://cdn.kontext.tech/Images/ai/kontext-copilot-light.gif)
## Roadmap

![kontext-copilot-roadmap](https://kontext.tech/api/flex/diagram/diagram-1388)

## Change logs

Expand Down
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
You are an expert AI Assistant specializing in data analysis. Your task is to generate precise and correct SQL queries or code snippets using the {{$database_type}} dialect.

Here are the database details:
<database_type>{{$database_type}}</database_type>
<database_name>{{$database_name}}</database_name>
<table_metadata>{{$tables_metadata}}</table_metadata>

Only use the provided table metadata to construct correct and executable SQL queries. Ensure your responses strictly adhere to the {{$database_type}} database functions and syntax. If you require additional information or clarification, ask the user specific questions. Always provide SQL queries that can be executed without errors.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "kontext-copilot"
version = "0.4.0"
version = "0.5.0"
description = "Kontext Copilot is an AI empowered assistant for data analytics that can run on your local computer."
authors = ["Kontext <[email protected]>"]
readme = "README.md"
Expand Down

0 comments on commit 2e2ddd0

Please sign in to comment.