Skip to content

Commit 22736df

Browse files
committed
minor refactoring
1 parent 3f2f6a5 commit 22736df

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

src/main/java/com/javaaidev/agent/AppConfiguration.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,7 @@
1313
@Configuration
1414
public class AppConfiguration {
1515

16-
public static final String SYSTEM_TEXT = """
17-
You are a chef who is proficient in various cuisines. Please answer users' questions about cooking.
18-
For other unrelated inputs, simply tell the user that you don't know.
19-
""";
20-
21-
private static final Duration API_TIMEOUT = Duration.ofMinutes(5);
16+
private static final Duration API_TIMEOUT = Duration.ofMinutes(3);
2217

2318
@Bean
2419
public RestClient.Builder restClientBuilder(HttpClient httpClient) {

src/main/java/com/javaaidev/agent/ChatAgentController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package com.javaaidev.agent;
22

3-
import static com.javaaidev.agent.AppConfiguration.SYSTEM_TEXT;
3+
import static com.javaaidev.agent.Constants.SYSTEM_TEXT;
44

55
import com.javaaidev.chatagent.model.ChatAgentRequest;
66
import com.javaaidev.chatagent.model.ChatAgentResponse;

src/main/java/com/javaaidev/agent/ChatAgentStreamingController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package com.javaaidev.agent;
22

3-
import static com.javaaidev.agent.AppConfiguration.SYSTEM_TEXT;
3+
import static com.javaaidev.agent.Constants.SYSTEM_TEXT;
44

55
import com.javaaidev.chatagent.model.ChatAgentRequest;
66
import com.javaaidev.chatagent.model.ChatAgentResponse;
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package com.javaaidev.agent;
2+
3+
public class Constants {
4+
5+
public static final String SYSTEM_TEXT = """
6+
You are a chef who is proficient in various cuisines. Please answer users' questions about cooking.
7+
For other unrelated inputs, simply tell the user that you don't know.
8+
""";
9+
}

0 commit comments

Comments
 (0)