Spring Boot整合Google Bard - Web接口訪問Google AI聊天機器人
之前開發(fā)了一個關于Google Bard
的Java庫,可以幫助我們簡單的提問并獲得答案?,F(xiàn)在我把它整合到Spring Boot
應用中,通過Web API讓大家可以訪問。
添加依賴
把pkslow google bard
添加到Spring Boot
項目中去:文章來源:http://www.zghlxwxcb.cn/news/detail-490864.html
<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>
創(chuàng)建GoogleBardClient
在使用它之前,我們需要創(chuàng)建一個對應的GoogleBardClient
Bean:文章來源地址http://www.zghlxwxcb.cn/news/detail-490864.html
到了這里,關于Spring Boot整合Google Bard - Web接口訪問Google AI聊天機器人的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關文章,希望大家以后多多支持TOY模板網(wǎng)!