Releases: intelligentnode/IntelliJava
IntelliJava 0.8.2
Update the language model to support the following languages in addition to existing English:
- German: Deutscher Audiosupport
- Arabic: دعم الصوت العربي
- Mandarin Chinese: 中文音频支持
- Turkish: Türkçe ses desteği
Text to speech code:
// 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[] decodedAudio1 = model.generateEnglishText(input);
byte[] decodedAudio2 = model.generateMandarinText(input);
byte[] decodedAudio3 = model.generateGermanText(input);
ChatGPT notes
If you have access to GPT4, you can use the library to access it as follow:
// 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.";
String ask = "generate LinkedIn post for new AI programming course.";
ChatModelInput input = new ChatGPTInput.Builder(mode).setModel("gpt-4").addUserMessage(ask).build();
// 3- call chat!
List<String> resValues = bot.chat(input);
Integration
Maven:
<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'
IntelliJava 0.8.0
Introducing the latest update to Intelligent Java with support for ChatGPT model 🚀.
Update summary:
- Support ChatGPT 🤖.
- Update the SpeechInput name to become Text2SpeechInput.
- Add enum input type to the image model.
Integration
Maven:
<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:
// 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:
// 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);
IntelliJava 0.7.0
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);
IntelliJava V0.6.2
Release details:
Release Intelligent Java (IntelliJava) new features: update the language model to support multiple text outputs and flexible models initialization using a string or an enum.
Maven:
<dependency>
<groupId>io.github.barqawiz</groupId>
<artifactId>intellijava.core</artifactId>
<version>0.6.2</version>
</dependency>
Openai access using string and one output:
// 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("return a java code that says hello world")
.setModel("text-davinci-002").setTemperature(0.7f).setMaxTokens(50).build();
String resValue = langModel.generateText(langInput);
Openai access using enum and multi output:
// 1- initiate the remote language model
String apiKey = "<add-openai-api-key>";
RemoteLanguageModel langModel = new RemoteLanguageModel(apiKey, SupportedLangModels.openai);
// 2- call generateText with any command !
LanguageModelInput input = new LanguageModelInput.Builder("Summarize the plot of the 'Inception' movie in two sentences")
.setModel("text-davinci-003").setTemperature(0.7f)
.setMaxTokens(80).setNumberOfOutputs(2).build();
List<String> resValues = langModel.generateMultiText(langInput);
Cohere.ai access
// 1- initiate the remote language model
String apiKey = "<add-cohere-api-key>";
RemoteLanguageModel langModel = new RemoteLanguageModel(apiKey, "cohere");
// 2- call generateText with any command !
LanguageModelInput langInput = new LanguageModelInput.Builder("Once upon a time in a magical land called")
.setModel("xlarge").setTemperature(0.7f).setMaxTokens(50).build();
String resValue = langModel.generateText(langInput);
IntelliJava V0.6.0
We are excited to announce the release of IntelliJava V0.6.0, which includes support for Cohere.ai, a language model that allows developers to tailor their models to their specific needs. This new version also includes enhancements to the library's API, making it even more flexible for integration with future models.
Maven:
<dependency>
<groupId>io.github.barqawiz</groupId>
<artifactId>intellijava.core</artifactId>
<version>0.6.0</version>
</dependency>
Openai access:
// 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("return a java code that says hello world")
.setModel("text-davinci-002").setTemperature(0.7f).setMaxTokens(50).build();
String resValue = langModel.generateText(langInput);
Cohere.ai access
// 1- initiate the remote language model
String apiKey = "<add-cohere-api-key>";
RemoteLanguageModel langModel = new RemoteLanguageModel(apiKey, "cohere");
// 2- call generateText with any command !
LanguageModelInput langInput = new LanguageModelInput.Builder("Once upon a time in a magical land called")
.setModel("xlarge").setTemperature(0.7f).setMaxTokens(50).build();
String resValue = langModel.generateText(langInput);
IntelliJava V0.5.5
The package released to [Maven Central Repository]
Maven:
<dependency>
<groupId>io.github.barqawiz</groupId>
<artifactId>intellijava.core</artifactId>
<version>0.5.5</version>
</dependency>
Gradle:
implementation group: 'io.github.barqawiz', name: 'intellijava.core', version: '0.5.5'
Gradle(Kotlin):
implementation("io.github.barqawiz:intellijava.core:0.5.5")