Skip to content

IntelliJava 0.7.0

Compare
Choose a tag to compare
@Barqawiz Barqawiz released this 18 Feb 00:03
· 33 commits to main since this release
ec254cc

Introducing the latest update to Intelligent Java with support for speech synthesis services.
With the new update, IntelliJava provides a comprehensive suite of services for working with deep learning frameworks by leveraging the power of OpenAI's GPT-3 and Cohere language models, DALL·E for image generation, and Google AI's speech synthesis models.

Integration

Maven:

<dependency>
    <groupId>io.github.barqawiz</groupId>
    <artifactId>intellijava.core</artifactId>
    <version>0.7.0</version>
</dependency>

Gradle:

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

Code Example

Text to speech code - new release (2 steps):

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

// 2- call generateEnglishText with any text
SpeechInput input = new SpeechInput.Builder("Hi, I am Intelligent Java.").build();
byte[] decodedAudio = model.generateEnglishText(input);

Output testing:

// save temporary audio file for testing
AudioHelper.saveTempAudio(decodedAudio);

Language model code (2 steps):

// 1- initiate the remote language model
String apiKey = "<add-openai-api-key>";
RemoteLanguageModel langModel = new RemoteLanguageModel(apiKey, "openai");

// 2- call generateText with any command !
LanguageModelInput langInput = new LanguageModelInput.Builder("Summarize the plot of the 'Inception' movie in two sentences")
                .setModel("text-davinci-003").setTemperature(0.7f).setMaxTokens(50).build();
String resValue = langModel.generateText(langInput);

Image generation code (2 steps):

// 1- initiate the remote image model
RemoteImageModel imageModel = new RemoteImageModel(apiKey, "openai");

// 2- call generateImages with any command !
ImageModelInput imageInput = new ImageModelInput.Builder("teddy writing a blog in times square")
                .setNumberOfImages(2).setImageSize("1024x1024").build();
List<String> images = imageModel.generateImages(imageInput);