Skip to content

Commit

Permalink
Merge pull request #58 from marcominerva/develop
Browse files Browse the repository at this point in the history
Change request prompt
  • Loading branch information
marcominerva authored Jan 23, 2024
2 parents 8427de2 + 3142dab commit ff6636e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion samples/DatabaseGpt.Web/Pages/Shared/_Layout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
@environment.ApplicationName
</a>
<div class="d-flex flex-row order-2 order-sm-3">
<a class="nav-link nav-link-bottom ps-3" title="GitHub" href="https://github.com/marcominerva/DatabaseGPT" target="_blank" style="font-size: 2rem;"><i class="bi bi-github"></i></a>
<a class="nav-link nav-link-bottom ps-3" title="GitHub" href="https://github.com/marcominerva/DatabaseGPT" target="_blank" style="font-size: 1.4rem;"><i class="bi bi-github"></i></a>
</div>
</div>
</nav>
Expand Down
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 ff6636e

Please sign in to comment.