Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Change SQL Chain prompt #70

Merged
merged 2 commits into from
Sep 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions src/services/chain/sql-database-chain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,13 @@ export default class SqlDatabaseChain extends BaseChain {
Remember to put double quotes around database table names.\n
-------------------------------------------\n
Here are some important observations for generating the query:\n
- Only execute the request on the service if the question is not in CHAT HISTORY, if the question has already been answered, use the same answer and do not make a query on the database.\n


USER CONTEXT:\n
{user_prompt}\n
{user_context}\n
-------------------------------------------\n
SCHEMA: {schema}\n
-------------------------------------------\n
CHAT HISTORY: {format_chat_messages}\n
-------------------------------------------\n
QUESTION: {question}\n
------------------------------------------\n
SQL QUERY:
Expand Down
Loading