Open in app

Sign In

Write

Sign In

Larry Deng
Larry Deng

6 Followers

Home

About

1 day ago

Spring Boot Integration with Google Bard — Web API to access the Google AI chat box

I have created a Java library for Google Bard that can help us make a simple call to ask questions and get answers. Now I integrated the Java library into the Spring Boot application. So that we can make it publicly available to others. Add Dependencies Add the pkslow google-bard to the…

Google Bard

2 min read

Spring Boot Integration with Google Bard — Web API to access the Google AI chat box
Spring Boot Integration with Google Bard — Web API to access the Google AI chat box
Google Bard

2 min read


6 days ago

Java Library for Google Bard to Ask Questions and Receive Answers

Google Bard is Google's experimental, conversational, AI chat service. It is meant to function similarly to ChatGPT, with the biggest difference being that Google's service will pull its information from the web. I want to use Google Bard automatically in a easier way, so I built a Java library for…

Google Bard

5 min read

Java Library for Google Bard to Ask Questions and Receive Answers
Java Library for Google Bard to Ask Questions and Receive Answers
Google Bard

5 min read


Mar 23

Use Python to Build a Google Bard Chatbot Client Locally

We had tried out the Google Bard with browser, more details here: Try out Google Bard, Will Google Bard beat the ChatGPT?. Now we want to automate the Chatting with code, so I used Python to try a interactive chatbot locally. Get the Session ID For security, we need to access Google Bard with…

Google Bard

4 min read

Use Python to Build a Google Bard Chatbot Client Locally
Use Python to Build a Google Bard Chatbot Client Locally
Google Bard

4 min read


Mar 22

Try out Google Bard, Will Google Bard beat the ChatGPT?

Give a try on Google Bard Google has begun opening up the Google Bard(An AI Chat Solution) to public. I joined the waitlist and soon got the chance to have a try on Google Bard. Just open the page: https://bard.google.com/ We can see it still under development as an experimental product. Let ask some questions: (1)…

Google Bard

3 min read

Try out Google Bard, Will Google Bard beat the ChatGPT?
Try out Google Bard, Will Google Bard beat the ChatGPT?
Google Bard

3 min read


Mar 21

Two ways to get the http request headers in Spring MVC

1 Introduction HTTP request headers are very important to all Web applications, this article will introduce two ways to get the http request headers in Spring MVC. First (1) Annotation @RequestHeader in Controller (2) RequestContextHolder anywhere 2 Annotation @RequestHeader This annotation should be used in Controller. 2.1 Get one request header if just get one header, it's quite easy. @GetMapping("/webSite") public…

Spring Boot

2 min read

Spring Boot

2 min read


Mar 21

Springboot Integrates with Swagger

Why need swagger Swagger helps users to build, document, test and consume RESTful web services. It facilitates better API management within teams and projects. Integration in official way Only two steps: (1) Add dependencies <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger2</artifactId> <version>2.9.2</version> </dependency> <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger-ui</artifactId> <version>2.9.2</version> </dependency>

Spring Boot

1 min read

Springboot Integrates with Swagger
Springboot Integrates with Swagger
Spring Boot

1 min read


Mar 21

Get Request Object anywhere in Spring WebFlux

A different World In a normal Spring Web project, we have handy way to get the Request Object and many libraries provide the static methods. The code as below: ServletRequestAttributes requestAttributes = (ServletRequestAttributes)RequestContextHolder.getRequestAttributes(); // get the request HttpServletRequest request = requestAttributes.getRequest(); The class RequestContextHolder provides the static methods so we can call it…

Java

3 min read

Java

3 min read


Mar 20

Six Ways to Create Objects in Java

1 Introduction Java is an OOP program language, we need to create Java Object whenever we use it. There are six ways to create the Object. 2 Six ways (1) the new keyword Pumpkin p1 = new Pumpkin(); (2) Reflection: class newInstance() Pumpkin p2 = Pumpkin.class.newInstance(); (3) Reflection: DeclaredConstructor newInstance() Pumpkin p3 = Pumpkin.class.getDeclaredConstructor().newInstance(); (4)…

Java

2 min read

Java

2 min read


Mar 9

Difference Between Callable and Runnable in Java

Introduction Both Runnable and Callable are interface for multiple-thread in Java. Let's compare them with code. The main differences: Runnable InterfaceCallable InterfacePackagejava.lang.Runnable since JDK 1.0java.util.concurrent.Callable Since JDK 1.5Methodpublic abstract void run();V call() throws Exception;ExceptionCan't Throw an exception;Can throw an exception;Return ValueCan't return any result;Can returun the result you want;

Java

3 min read

Java

3 min read


Mar 9

Callable VS Runnable对比

简介 这两个都是接口,在Java多线程中用得很多。主要区别有: Runnable InterfaceCallable Interface类包java.lang.Runnable,JDK 1.0就有java.util.concurrent.Callable, JDK 1.5引入方法public abstract void run();V call() th …

Java

10 min read

Java

10 min read

Larry Deng

Larry Deng

6 Followers

Java Developer

Following
  • Hantsy

    Hantsy

  • Google Developers

    Google Developers

See all (5)

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech