Download Latest Version IntelliJava 0.8.2.zip (2.9 MB)
Email in envelope

Get an email when there's a new version of Intelligent Java

Home / release0.8.0
Name Modified Size InfoDownloads / Week
Parent folder
IntelliJava 0.8.0.tar.gz 2023-03-04 3.0 MB
IntelliJava 0.8.0.zip 2023-03-04 3.0 MB
README.md 2023-03-04 1.5 kB
Totals: 3 Items   6.0 MB 0

Introducing the latest update to Intelligent Java with support for ChatGPT model :rocket:.

Update summary:

  • Support ChatGPT :robot:.
  • Update the SpeechInput name to become Text2SpeechInput.
  • Add enum input type to the image model.

Integration

Maven:

:::xml
<dependency>
    <groupId>io.github.barqawiz</groupId>
    <artifactId>intellijava.core</artifactId>
    <version>0.8.0</version>
</dependency>

Gradle:

implementation 'io.github.barqawiz:intellijava.core:0.8.0'

Example

ChatGPT code:

:::java
// 1- initiate the chat model.
Chatbot bot = new Chatbot(apiKey, SupportedChatModels.openai);

// 2- prepare the chat history by calling addMessage.
String mode = "You are a helpful astronomy assistant.";
ChatModelInput input = new ChatGPTInput.Builder(mode).addUserMessage("what is the space between moon and earth").build();

// 3- call chat!
List<String> resValues =  bot.chat(input);

Output:The average distance between the Moon and the Earth is about 238,855 miles (384,400 kilometers).


Text to speech code:

:::java
// 1- initiate the remote speech model
RemoteSpeechModel model = new RemoteSpeechModel(apiKey, SpeechModels.google);

// 2- call generateEnglishText with any text
Text2SpeechInput input = new Text2SpeechInput.Builder("Hi, I am Intelligent Java.").build();
byte[] decodedAudio = model.generateEnglishText(input);
Source: README.md, updated 2023-03-04