From e401df7887ae3315880baa51e656cd0021ce0e22 Mon Sep 17 00:00:00 2001 From: Marco Minerva Date: Tue, 23 Jan 2024 15:28:18 +0100 Subject: [PATCH 1/2] Fix icon size --- samples/DatabaseGpt.Web/Pages/Shared/_Layout.cshtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/DatabaseGpt.Web/Pages/Shared/_Layout.cshtml b/samples/DatabaseGpt.Web/Pages/Shared/_Layout.cshtml index 8f303a9..0b6cf99 100644 --- a/samples/DatabaseGpt.Web/Pages/Shared/_Layout.cshtml +++ b/samples/DatabaseGpt.Web/Pages/Shared/_Layout.cshtml @@ -37,7 +37,7 @@ @environment.ApplicationName
- +
From 3142dab6bb50a3e0206cdba6ea0d1f199e97845d Mon Sep 17 00:00:00 2001 From: Marco Minerva Date: Tue, 23 Jan 2024 15:33:39 +0100 Subject: [PATCH 2/2] Change request prompt --- src/DatabaseGpt/DatabaseGptClient.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/DatabaseGpt/DatabaseGptClient.cs b/src/DatabaseGpt/DatabaseGptClient.cs index 00909af..890dd41 100644 --- a/src/DatabaseGpt/DatabaseGptClient.cs +++ b/src/DatabaseGpt/DatabaseGptClient.cs @@ -76,7 +76,8 @@ private async Task CreateSessionAsync(Guid sessionId, CancellationToken ca private async Task> 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'.