@@ -81,16 +81,17 @@ public async Task AddSqlPrompt_ValidPrompt_InsertsSuccessfully()
8181 Model = "gpt4" ,
8282 OutputFormat = "json" ,
8383 MaxTokens = 500 ,
84+ Temperature = 0.7f ,
8485 SystemPrompt = "Optimize SQL queries." ,
8586 UserPrompt = "Suggest indexing improvements." ,
8687 Parameters = new Dictionary < string , string >
8788 {
88- { "Temperature " , "0.7 " } ,
89- { "TopP " , "0.9 " }
89+ { "query " , "string " } ,
90+ { "topP " , "number " }
9091 } ,
9192 Default = new Dictionary < string , object >
9293 {
93- { "Temperature " , "0.5 " }
94+ { "topP " , "0.9 " }
9495 }
9596 } ;
9697
@@ -111,16 +112,17 @@ public async Task AddSqlPrompt_SamePromptNoChanges_DoesNotInsertNewVersion()
111112 Model = "gpt4" ,
112113 OutputFormat = "json" ,
113114 MaxTokens = 200 ,
115+ Temperature = 0.5f ,
114116 SystemPrompt = "Optimize SQL queries." ,
115117 UserPrompt = "Suggest indexing improvements." ,
116118 Parameters = new Dictionary < string , string >
117119 {
118- { "Temperature " , "0.7 " } ,
119- { "TopP " , "0.9 " }
120+ { "query " , "string " } ,
121+ { "topP " , "number " }
120122 } ,
121123 Default = new Dictionary < string , object >
122124 {
123- { "Temperature " , "0.5 " }
125+ { "topP " , "0.9 " }
124126 }
125127 } ;
126128
@@ -145,8 +147,8 @@ public async Task AddSqlPrompt_WhenMaxTokensChanges_ShouldInsertNewVersion()
145147 MaxTokens = 500 ,
146148 SystemPrompt = "Optimize SQL queries." ,
147149 UserPrompt = "Suggest indexing improvements." ,
148- Parameters = new Dictionary < string , string > { { "Temperature " , "0.7 " } } ,
149- Default = new Dictionary < string , object > { { "Temperature " , "0.5 " } }
150+ Parameters = new Dictionary < string , string > { { "query " , "string " } } ,
151+ Default = new Dictionary < string , object > { { "query " , "SELECT 1 " } }
150152 } ;
151153
152154 var entity2 = new SqlPromptEntity
@@ -157,8 +159,8 @@ public async Task AddSqlPrompt_WhenMaxTokensChanges_ShouldInsertNewVersion()
157159 MaxTokens = 512 , // Changed value
158160 SystemPrompt = "Optimize SQL queries." ,
159161 UserPrompt = "Suggest indexing improvements." ,
160- Parameters = new Dictionary < string , string > { { "Temperature " , "0.7 " } } ,
161- Default = new Dictionary < string , object > { { "Temperature " , "0.5 " } }
162+ Parameters = new Dictionary < string , string > { { "query " , "string " } } ,
163+ Default = new Dictionary < string , object > { { "query " , "SELECT 1 " } }
162164 } ;
163165
164166 await _repository . AddSqlPrompt ( entity1 ) ; // Insert first version
@@ -182,8 +184,8 @@ public async Task GetSqlPromptByName_GivenTwoPromptsOfTheSameNameAreAdded_Should
182184 MaxTokens = 500 ,
183185 SystemPrompt = "Optimize SQL queries." ,
184186 UserPrompt = "Suggest indexing improvements." ,
185- Parameters = new Dictionary < string , string > { { "Temperature " , "0.7 " } } ,
186- Default = new Dictionary < string , object > { { "Temperature " , "0.5 " } }
187+ Parameters = new Dictionary < string , string > { { "query " , "string " } } ,
188+ Default = new Dictionary < string , object > { { "query " , "SELECT 1 " } }
187189 } ;
188190
189191 var entity2 = new SqlPromptEntity
@@ -194,8 +196,8 @@ public async Task GetSqlPromptByName_GivenTwoPromptsOfTheSameNameAreAdded_Should
194196 MaxTokens = 512 , // Changed value
195197 SystemPrompt = "Optimize SQL queries 2." , // changed value
196198 UserPrompt = "Suggest indexing improvements." ,
197- Parameters = new Dictionary < string , string > { { "Temperature " , "0.7 " } } ,
198- Default = new Dictionary < string , object > { { "Temperature " , "0.5 " } }
199+ Parameters = new Dictionary < string , string > { { "query " , "string " } } ,
200+ Default = new Dictionary < string , object > { { "query " , "SELECT 1 " } }
199201 } ;
200202
201203 await _repository . AddSqlPrompt ( entity1 ) ; // Insert first version
0 commit comments