Skip to content

Commit

Permalink
Change request prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
marcominerva committed Jan 23, 2024
1 parent e401df7 commit 3142dab
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/DatabaseGpt/DatabaseGptClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ private async Task<Guid> CreateSessionAsync(Guid sessionId, CancellationToken ca
private async Task<IEnumerable<string>> GetTablesAsync(Guid sessionId, string question, NaturalLanguageQueryOptions? options, CancellationToken cancellationToken)
{
var request = $"""
You must answer the following question, '{question}', using a {provider.Language} query for a {provider.Name} database. Take into account the context of the chat to complete the question, adding the context from the chat.
You must answer the following question, '{question}', using a {provider.Language} query for a {provider.Name} database.
Take into account the context of the chat to complete the question, adding the context from the chat. For example, if the first question is 'Give me the name of the suppliers', and the next question is 'Order them by ID', then the complete question that you must anwer is 'Give me the name of the suppliers, order them by ID'.
From the comma separated list of tables available in the database, select those tables that might be useful in the generated {provider.Language} query.
The selected tables should be returned in a comma separated list. Your response should just contain the comma separated list of selected tables.
The table name should always contain the schema name. For example, if the table name is 'Table1' and the schema name is 'dbo', then the table name should be 'dbo.Table1'.
Expand Down

0 comments on commit 3142dab

Please sign in to comment.