diff --git a/pom.xml b/pom.xml
index 0a16484..d1dd382 100644
--- a/pom.xml
+++ b/pom.xml
@@ -10,7 +10,7 @@
com.wse
qanary-explanation-service
- 3.3.0
+ 3.3.1
Qanary explanation service
Webservice for rule-based explanation of QA-Systems as well as specific components
diff --git a/service_config/files/.env b/service_config/files/.env
index 23fad5f..9a1ff43 100644
--- a/service_config/files/.env
+++ b/service_config/files/.env
@@ -1,5 +1,5 @@
SPARQL_ENDPOINT=http://demos.swe.htwk-leipzig.de:40111/sparql
-QANARY_PIPELINE_HOST=http://demos.swe.htwk-leipzig.de
+QANARY_PIPELINE_HOST=demos.swe.htwk-leipzig.de
QANARY_PIPELINE_PORT=40111
VIRTUOSO_TRIPLESTORE_ENDPOINT=jdbc:virtuoso://demos.swe.htwk-leipzig.de:40142
VIRTUOSO_TRIPLESTORE_USERNAME=readWrite
diff --git a/src/main/java/com/wse/qanaryexplanationservice/services/GenerativeExplanationsService.java b/src/main/java/com/wse/qanaryexplanationservice/services/GenerativeExplanationsService.java
index d379687..45dbeba 100644
--- a/src/main/java/com/wse/qanaryexplanationservice/services/GenerativeExplanationsService.java
+++ b/src/main/java/com/wse/qanaryexplanationservice/services/GenerativeExplanationsService.java
@@ -12,17 +12,15 @@
import com.wse.qanaryexplanationservice.helper.pojos.InputQueryExample;
import com.wse.qanaryexplanationservice.helper.pojos.QanaryComponent;
import com.wse.qanaryexplanationservice.repositories.GenerativeExplanationsRepository;
+import eu.wdaqua.qanary.commons.triplestoreconnectors.QanaryTripleStoreConnector;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Lazy;
-import org.springframework.core.io.ClassPathResource;
import org.springframework.stereotype.Service;
-import java.io.File;
import java.io.IOException;
-import java.nio.file.Files;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@@ -175,8 +173,7 @@ public String createPrompt(int shots, GenerativeExplanationObject generativeExpl
}
public String getStringFromFile(String path) throws IOException {
- File file = new ClassPathResource(path).getFile();
- return new String(Files.readAllBytes(file.toPath()));
+ return QanaryTripleStoreConnector.readFileFromResources(path);
}
public String sendPrompt(String prompt, GptModel gptModel) throws Exception {