@@ -66,6 +66,7 @@ public class LlmActionSelector implements IActionSelector {
6666
6767 private final String platform ;
6868 private final String model ;
69+ private final String reasoning ;
6970 private final String hostUrl ;
7071 private final String authorizationHeader ;
7172 private final String actionFewshotFile ;
@@ -79,7 +80,6 @@ public class LlmActionSelector implements IActionSelector {
7980 private int tokens_used ;
8081 private Integer invalidActions ;
8182
82- private Gson gson = new Gson ();
8383 private String previousTestGoal = "" ;
8484 private LlmTestGoal currentTestGoal ;
8585
@@ -97,6 +97,7 @@ public LlmActionSelector(Settings settings, IPromptActionGenerator generator) {
9797
9898 this .platform = settings .get (ConfigTags .LlmPlatform );
9999 this .model = settings .get (ConfigTags .LlmModel );
100+ this .reasoning = settings .get (ConfigTags .LlmReasoning );
100101 this .hostUrl = settings .get (ConfigTags .LlmHostUrl );
101102 this .authorizationHeader = settings .get (ConfigTags .LlmAuthorizationHeader );
102103 this .historySize = settings .get (ConfigTags .LlmHistorySize );
@@ -110,7 +111,7 @@ public LlmActionSelector(Settings settings, IPromptActionGenerator generator) {
110111 }
111112
112113 private void initializeConversation () {
113- conversation = LlmFactory .createLlmConversation (this .platform , this .model , this .temperature );
114+ conversation = LlmFactory .createLlmConversation (this .platform , this .model , this .reasoning , this . temperature );
114115 conversation .initConversation (this .actionFewshotFile );
115116 }
116117
@@ -171,9 +172,9 @@ private Action selectActionWithLlm(State state, Set<Action> actions) {
171172 logger .log (Level .DEBUG , "Generated prompt: " + prompt );
172173 conversation .addMessage ("user" , prompt );
173174
174- String conversationJson = gson . toJson ( conversation );
175+ String conversationJson = conversation . buildRequestBody ( );
175176 String llmResponse = getResponseFromLlm (conversationJson );
176- LlmParseActionResponse llmParseResponse = new LlmParseActionResponse (gson );
177+ LlmParseActionResponse llmParseResponse = new LlmParseActionResponse (new Gson () );
177178 LlmParseActionResult llmParseResult = llmParseResponse .parseLlmResponse (actions , llmResponse );
178179
179180 switch (llmParseResult .getParseResult ()) {
0 commit comments