Skip to content

Commit a73441e

Browse files
authored
Merge pull request #181 from pwgit-create/develop
release 2.0.4
2 parents e85cf0d + 11c2d5f commit a73441e

File tree

7 files changed

+49
-30
lines changed

7 files changed

+49
-30
lines changed

AppWish/AppWish/dependency-reduced-pom.xml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
<groupId>pn.dev</groupId>
55
<artifactId>code-generator-gui-ollama</artifactId>
66
<name>CodeGenerator-GUI</name>
7-
<version>2.0.3</version>
8-
<description>The GUI interface for the pn.dev.code-generator-ollama library is included in this package</description>
7+
<version>2.0.4</version>
8+
<description>The GUI interface for the pn.dev.code-generator-ollama library</description>
99
<inceptionYear>2024</inceptionYear>
1010
<developers>
1111
<developer>
@@ -14,7 +14,8 @@
1414
<email>snow_900@outlook.com</email>
1515
<roles>
1616
<role>Security Champion</role>
17-
<role>Backend Engineer</role>
17+
<role>CCT Scheme Committee (2023-2026)</role>
18+
<role>Open Source Developer</role>
1819
</roles>
1920
<timezone>Central European Time</timezone>
2021
</developer>

AppWish/AppWish/pom.xml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
<modelVersion>4.0.0</modelVersion>
66
<groupId>pn.dev</groupId>
77
<artifactId>code-generator-gui-ollama</artifactId>
8-
<version>2.0.3</version>
8+
<version>2.0.4</version>
99
<name>CodeGenerator-GUI</name>
1010

1111

12-
<description>The GUI interface for the pn.dev.code-generator-ollama library is included in this package</description>
12+
<description>The GUI interface for the pn.dev.code-generator-ollama library</description>
1313
<inceptionYear>2024</inceptionYear>
1414

1515
<developers>
@@ -19,12 +19,20 @@
1919
<email>snow_900@outlook.com</email>
2020
<roles>
2121
<role>Security Champion</role>
22-
<role>Backend Engineer</role>
22+
<role>CCT Scheme Committee (2023-2026)</role>
23+
<role>Open Source Developer</role>
2324
</roles>
2425
<timezone>Central European Time</timezone>
2526
</developer>
2627
</developers>
2728

29+
<licenses>
30+
<license>
31+
<name>MIT License</name>
32+
<url>https://raw.githubusercontent.com/pwgit-create/APPWISH_OLLAMA/master/LICENSE</url>
33+
</license>
34+
</licenses>
35+
2836
<properties>
2937
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
3038
<junit.version>5.11.0-M2</junit.version>
@@ -45,7 +53,7 @@
4553
<dependency>
4654
<groupId>pn.dev</groupId>
4755
<artifactId>code-generator-ollama</artifactId>
48-
<version>2.0.3</version>
56+
<version>2.0.4</version>
4957
</dependency>
5058
<dependency>
5159
<groupId>org.openjfx</groupId>

AppWish/AppWish/src/main/java/pn/app_wish/AppWish.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,7 @@ public void start(Stage primaryStage) throws IOException {
106106
System.setProperty(SimpleLogger.DEFAULT_LOG_LEVEL_KEY, "DEBUG");
107107
Parent root = FXMLLoader.load(requireNonNull(getClass().getClassLoader().getResource(DEFAULT_FXML_FILE)));
108108
mainStage = primaryStage;
109-
mainStage.setFullScreen(false);
110109
mainStage.setResizable(false);
111-
primaryStage.setFullScreen(false);
112110
primaryStage.setResizable(false);
113111
primaryStage.setTitle(GUIConstants.DEFAULT_STAGE_TITLE);
114112
Scene scene = new Scene(root);

AppWish/AppWish/src/main/java/pn/app_wish/controller/AppHistoryController.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,15 @@ private void goToMainScene(ActionEvent ae) {
124124
this.executingJavaAppProcess.toHandle().destroy();
125125
}
126126
Pane pane;
127+
127128
try {
128129
pane = FXMLLoader.load(
129130
Objects.requireNonNull(getClass().getClassLoader().getResource(GUIConstants.DEFAULT_FXML_FILE)));
130131
} catch (IOException e) {
131132
throw new RuntimeException(e);
132133
}
134+
135+
pane.requestLayout();
133136
Scene scene = new Scene(pane);
134137
Stage stage = AppWish.getMainStage();
135138
stage.setScene(scene);

cg/CodeGenerator/CodeGenerator/dependency-reduced-pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>pn.dev</groupId>
55
<artifactId>code-generator-ollama</artifactId>
6-
<version>2.0.3</version>
6+
<version>2.0.4</version>
77
<description>The Java Application-Generator (pn.dev.code-generator-ollama) creates applications by giving a string of your desired features for a Java application, like this: AppSystem.StartCodeGenerator(String appWish)</description>
88
<inceptionYear>2024</inceptionYear>
99
<developers>
@@ -12,8 +12,8 @@
1212
<name>Peter Westin</name>
1313
<email>snow_900@outlook.com</email>
1414
<roles>
15-
<role>Security Champion</role>
16-
<role>Backend Engineer</role>
15+
<role>CCT Scheme Committee (2023-2026)</role>
16+
<role>Open Source Developer</role>
1717
</roles>
1818
<timezone>Central European Time</timezone>
1919
</developer>

cg/CodeGenerator/CodeGenerator/pom.xml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>pn.dev</groupId>
88
<artifactId>code-generator-ollama</artifactId>
9-
<version>2.0.3</version>
9+
<version>2.0.4</version>
1010

1111

1212
<description>The Java Application-Generator (pn.dev.code-generator-ollama) creates applications by giving a string of your desired features for a Java application, like this: AppSystem.StartCodeGenerator(String appWish)</description>
@@ -18,13 +18,20 @@
1818
<id>Peter</id>
1919
<email>snow_900@outlook.com</email>
2020
<roles>
21-
<role>Security Champion</role>
22-
<role>Backend Engineer</role>
21+
<role>CCT Scheme Committee (2023-2026)</role>
22+
<role>Open Source Developer</role>
2323
</roles>
2424
<timezone>Central European Time</timezone>
2525
</developer>
2626
</developers>
2727

28+
<licenses>
29+
<license>
30+
<name>MIT License</name>
31+
<url>https://raw.githubusercontent.com/pwgit-create/APPWISH_OLLAMA/master/LICENSE</url>
32+
</license>
33+
</licenses>
34+
2835

2936
<properties>
3037
<maven.compiler.source>19</maven.compiler.source>
@@ -46,12 +53,12 @@
4653
<dependencies>
4754

4855
<!-- https://mvnrepository.com/artifact/io.github.amithkoujalgi/ollama4j -->
49-
<dependency>
50-
<groupId>io.github.amithkoujalgi</groupId>
51-
<artifactId>ollama4j</artifactId>
52-
<version>1.0.73</version>
53-
</dependency>
54-
<!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api -->
56+
<dependency>
57+
<groupId>io.github.ollama4j</groupId>
58+
<artifactId>ollama4j</artifactId>
59+
<version>1.0.79</version>
60+
</dependency>
61+
<!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api -->
5562
<dependency>
5663
<groupId>org.junit.jupiter</groupId>
5764
<artifactId>junit-jupiter-api</artifactId>

cg/CodeGenerator/CodeGenerator/src/main/java/pn/cg/ollama_ai_remote/request/RequestHandlerImpl.java

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
package pn.cg.ollama_ai_remote.request;
22

33

4+
import io.github.ollama4j.OllamaAPI;
5+
import io.github.ollama4j.exceptions.OllamaBaseException;
6+
7+
import io.github.ollama4j.models.OllamaResult;
8+
import io.github.ollama4j.utils.Options;
9+
import io.github.ollama4j.utils.OptionsBuilder;
10+
import io.github.ollama4j.utils.PromptBuilder;
411
import pn.cg.app_system.code_generation.model.SuperApp;
512
import pn.cg.datastorage.CodeGeneratorConfig;
613
import pn.cg.datastorage.DataStorage;
@@ -9,12 +16,7 @@
916
import org.slf4j.Logger;
1017
import org.slf4j.LoggerFactory;
1118

12-
import io.github.amithkoujalgi.ollama4j.core.OllamaAPI;
13-
import io.github.amithkoujalgi.ollama4j.core.exceptions.OllamaBaseException;
14-
import io.github.amithkoujalgi.ollama4j.core.models.OllamaResult;
15-
import io.github.amithkoujalgi.ollama4j.core.utils.Options;
16-
import io.github.amithkoujalgi.ollama4j.core.utils.OptionsBuilder;
17-
import io.github.amithkoujalgi.ollama4j.core.utils.PromptBuilder;
19+
1820
import pn.cg.util.CodeGeneratorUtil;
1921
import pn.cg.util.StringUtil;
2022

@@ -116,7 +118,7 @@ public String sendQuestionToOllamaInstance(String question, String pathToJavaFil
116118

117119
OllamaResult result = null;
118120
try {
119-
result = api.generate(codeGeneratorConfig.getOllamaModel(), promptBuilder.build(), options);
121+
result = api.generate(codeGeneratorConfig.getOllamaModel(), promptBuilder.build(),false, options);
120122

121123
} catch (OllamaBaseException | IOException | InterruptedException e) {
122124
log.error("Error while sending a request to the local Ollama Server");
@@ -262,7 +264,7 @@ public String sendSuperAppQuestionToOllamaInstance(SuperApp superAppClass) {
262264

263265
OllamaResult result = null;
264266
try {
265-
result = api.generate(codeGeneratorConfig.getOllamaModel(), promptBuilder.build(), options);
267+
result = api.generate(codeGeneratorConfig.getOllamaModel(), promptBuilder.build(),false ,options);
266268

267269
} catch (OllamaBaseException | IOException | InterruptedException e) {
268270
log.error("Error while sending a request to the local Ollama Server");
@@ -287,7 +289,7 @@ private String GetListOfClasses(String question) {
287289

288290
OllamaResult result = null;
289291
try {
290-
result = api.generate(codeGeneratorConfig.getOllamaModel(), initialPrompt.build(), options);
292+
result = api.generate(codeGeneratorConfig.getOllamaModel(), initialPrompt.build(),false, options);
291293

292294

293295
} catch (OllamaBaseException | IOException | InterruptedException e) {

0 commit comments

Comments
 (0)