@RestController
@RequestMapping("/spring/ai/api/v1/prompt")
@ConditionalOnProperty(name="spring.ai.model.chat",
havingValue="ollama",
matchIfMissing=false)
public class SpringAIPromptControllerextends Object
@GetMapping("/roles")
publicorg.springframework.http.ResponseEntity<JsonResult<?>>roles(@RequestParam(value="message",defaultValue="Tell me about three famous pirates from the Golden Age of Piracy and why they did. Write at least a sentence for each pirate.")
String message,
@RequestParam(value="name",defaultValue="Bob")
String name,
@RequestParam(value="voice",defaultValue="pirate")
String voice)
stuff
@GetMapping("/stuff")
publicorg.springframework.http.ResponseEntity<JsonResult<?>>stuff(@RequestParam(value="message",defaultValue="Which athletes won the mixed doubles gold medal in curling at the 2022 Winter Olympics?\'")
String message,
@RequestParam(value="stuff",defaultValue="false")
boolean stuff)
rag
@GetMapping("/rag")
publicorg.springframework.http.ResponseEntity<JsonResult<?>>rag(@RequestParam(value="message",defaultValue="What is the most popular bike brand?")
String message)
@GetMapping("/structured")
publicorg.springframework.http.ResponseEntity<JsonResult<?>>structured(@RequestParam(value="message",defaultValue="Tell me about the actor Jeff Bridges")
String message)