Skip to content

Commit ccff2bb

Browse files
committed
refactor: create IMAGE_GENERATION_TOPIC default value
1 parent 7ca3eac commit ccff2bb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sample/jvm/src/main/java/co/yml/ychat/jvm/controller/YChatController.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public ResponseEntity<String> chatCompletions(
3434

3535
@GetMapping("generations")
3636
public ResponseEntity<String> imageGenerations(
37-
@RequestParam(value = "prompt", defaultValue = Defaults.CHAT_COMPLETION_INPUT) String input
37+
@RequestParam(value = "prompt", defaultValue = Defaults.IMAGE_GENERATION_TOPIC) String input
3838
) throws Exception {
3939
String result = YChatService.getImageGenerationsAnswer(input);
4040
return ResponseEntity.ok(result);
@@ -44,5 +44,6 @@ private static class Defaults {
4444
static final String COMPLETION_INPUT = "Say this is a test.";
4545
static final String CHAT_COMPLETION_INPUT = "Tell me one strength exercise";
4646
static final String CHAT_COMPLETION_TOPIC = "fitness";
47+
static final String IMAGE_GENERATION_TOPIC = "ocean";
4748
}
4849
}

0 commit comments

Comments
 (0)