主题
入门
1、效果

2、配置方法
shell
vim ~/.zshrc
yaml
spring:
ai:
qwen:
api-key: ${DASHSCOPE_API_KEY}
export DASHSCOPE_API_KEY=sk-xxxxxxbf9 // 配置成你自己的api key
3、调用接口
java
@Autowired
private ChatModel chatModel;
@GetMapping
String ai(@RequestParam("msg") String userInput) {
return this.chatClient.prompt()
.user(userInput)
.call()
.content();
}