Spring Boot整合Google Bard - Web接口访问Google AI聊天机器人
之前开发了一个关于Google Bard的Java库,可以帮助我们简单的提问并获得答案。现在我把它整合到Spring Boot应用中,通过Web API让大家可以访问。
添加依赖
把pkslow google bard添加到Spring Boot项目中去:
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>com.pkslow</groupId>
<artifactId>google-bard</artifactId>
<version>0.0.3</version>
</dependency>
</dependencies>
创建GoogleBardClient
在使用它之前,我们需要创建一个对应的GoogleBardClient Bean:

最低0.47元/天 解锁文章
879

被折叠的 条评论
为什么被折叠?



