Skip to content

Commit 7af93b6

Browse files
authored
Merge pull request intelligentnode#4 from bhaumikymehta/main
Renaming class from RemoateImageModel.java to RemoteImageModel.java and updating gitignore for IDE support
2 parents 6c5cd54 + 190d22f commit 7af93b6

File tree

6 files changed

+43
-15
lines changed

6 files changed

+43
-15
lines changed

.gitignore

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,32 @@ replay_pid*
4242

4343
# jar exception
4444
!package/**/*.jar
45-
!sample_code/jars/**/*.jar
45+
!sample_code/jars/**/*.jar
46+
47+
### STS ###
48+
.apt_generated
49+
.classpath
50+
.factorypath
51+
.project
52+
.settings
53+
.springBeans
54+
.sts4-cache
55+
56+
### IntelliJ IDEA ###
57+
.idea
58+
*.iws
59+
*.iml
60+
*.ipr
61+
62+
### NetBeans ###
63+
/nbproject/private/
64+
/nbbuild/
65+
/dist/
66+
/nbdist/
67+
/.nb-gradle/
68+
build/
69+
!**/src/main/**/build/
70+
!**/src/test/**/build/
71+
72+
### VS Code ###
73+
.vscode/

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ The supported models:
1111

1212
1. Import the core jar file OR maven dependency (check the Integration section).
1313
2. Add Gson dependency if using the jar file; otherwise, it's handled by maven or Gradle.
14-
3. Call the ``RemoteLanguageModel`` for the language models and ``RemoateImageModel`` for image generation.
14+
3. Call the ``RemoteLanguageModel`` for the language models and ``RemoteImageModel`` for image generation.
1515

1616
## Integration
1717
The package released to [Maven Central Repository](https://central.sonatype.com/artifact/io.github.barqawiz/intellijava.core/0.6.2).
@@ -58,7 +58,7 @@ Output:```Inception follows Dom Cobb, a professional thief, who is offered a cha
5858
**Image generation code** (2 steps):
5959
```java
6060
// 1- initiate the remote image model
61-
RemoateImageModel imageModel = new RemoateImageModel(apiKey, "openai");
61+
RemoteImageModel imageModel = new RemoteImageModel(apiKey, "openai");
6262

6363
// 2- call generateImages with any command !
6464
ImageModelInput imageInput = new ImageModelInput.Builder("teddy writing a blog in times square")

core/com.intellijava.core/pom.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
1919
</license>
2020
</licenses>
21-
21+
2222
<developers>
2323
<developer>
2424
<name>Ahmad Albarqawi</name>
@@ -27,13 +27,13 @@
2727
<organizationUrl>http://www.ahmadai.com</organizationUrl>
2828
</developer>
2929
</developers>
30-
30+
3131
<scm>
3232
<connection>scm:git:git://github.com/Barqawiz/IntelliJava.git</connection>
3333
<developerConnection>scm:git:ssh://github.com:Barqawiz/IntelliJava.git</developerConnection>
3434
<url>https://github.com/Barqawiz/IntelliJava</url>
3535
</scm>
36-
36+
3737
<properties>
3838
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
3939
<maven.compiler.source>11</maven.compiler.source>
@@ -112,10 +112,10 @@
112112
<artifactId>maven-project-info-reports-plugin</artifactId>
113113
<version>3.0.0</version>
114114
</plugin>
115-
115+
116116
</plugins>
117117
</pluginManagement>
118-
118+
119119
<plugins>
120120
<!-- GPG Signed Components -->
121121
<plugin>
@@ -152,7 +152,7 @@
152152
<executions>
153153
<execution>
154154
<id>attach-sources</id>
155-
155+
156156
<goals>
157157
<goal>jar-no-fork</goal>
158158
</goals>

core/com.intellijava.core/src/main/java/com/intellijava/core/controller/RemoateImageModel.java renamed to core/com.intellijava.core/src/main/java/com/intellijava/core/controller/RemoteImageModel.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
*
3535
* @author github.com/Barqawiz
3636
*/
37-
public class RemoateImageModel {
37+
public class RemoteImageModel {
3838

3939
private String keyType;
4040
private OpenAIWrapper openaiWrapper;
@@ -51,7 +51,7 @@ public class RemoateImageModel {
5151
* @throws IllegalArgumentException if the keyType passed is not "openai".
5252
*
5353
*/
54-
public RemoateImageModel(String keyValue, String keyType) {
54+
public RemoteImageModel(String keyValue, String keyType) {
5555

5656
if (keyType.isEmpty() || keyType.equals("openai")) {
5757
this.keyType = "openai";

core/com.intellijava.core/src/test/java/com/intellijava/core/OpenaiModelConnectionTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import java.util.List;
2424
import java.util.Map;
2525
import org.junit.Test;
26-
import com.intellijava.core.controller.RemoateImageModel;
26+
import com.intellijava.core.controller.RemoteImageModel;
2727
import com.intellijava.core.controller.RemoteLanguageModel;
2828
import com.intellijava.core.model.OpenaiImageResponse;
2929
import com.intellijava.core.model.OpenaiImageResponse.Data;
@@ -154,7 +154,7 @@ public void testOpenaiImageRemoteModel() {
154154

155155
try {
156156

157-
RemoateImageModel wrapper = new RemoateImageModel(openaiKey, "openai");
157+
RemoteImageModel wrapper = new RemoteImageModel(openaiKey, "openai");
158158
ImageModelInput input = new ImageModelInput.Builder(prompt)
159159
.setNumberOfImages(2).setImageSize("1024x1024").build();
160160

sample_code/src/com/intelliJava/test/OpenaiApp.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
import java.io.IOException;
1919
import java.util.List;
20-
import com.intellijava.core.controller.RemoateImageModel;
20+
import com.intellijava.core.controller.RemoteImageModel;
2121
import com.intellijava.core.controller.RemoteLanguageModel;
2222
import com.intellijava.core.model.input.ImageModelInput;
2323
import com.intellijava.core.model.input.LanguageModelInput;
@@ -90,7 +90,7 @@ private static void tryTheLanguageModelMultiText(String apiKey) throws IOExcepti
9090

9191
private static void tryTheImageModel(String apiKey) throws IOException {
9292
// initiate the remote image model wrapper
93-
RemoateImageModel imageModel = new RemoateImageModel(apiKey, "openai");
93+
RemoteImageModel imageModel = new RemoteImageModel(apiKey, "openai");
9494

9595
// prepare the input parameters
9696
ImageModelInput imageInput = new ImageModelInput.Builder("teddy writing a blog in times square")

0 commit comments

Comments
 (0)