Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ public SimpleAiController(ChatClient.Builder chatClientBuilder) {
this.chatClient = chatClientBuilder.build();
}

@GetMapping("/prompt")
public String callAzureOpenAI(@RequestParam(defaultValue = "Tell me the benefit of Spring Framework in Japanese") String prompt) {
return chatClient.prompt().user(prompt).call().content();
@GetMapping("/ai/joke")
public String generate(@RequestParam(name = "message", defaultValue = "Tell me a funny joke in Japanese") String message) {
return chatClient.prompt().user(message).call().content();
}
}