diff --git a/qanary-component-NED-OpenAI-GPT/src/main/java/eu/wdaqua/qanary/component/ned/gpt/GptBasedNamedEntityDisambiguation.java b/qanary-component-NED-OpenAI-GPT/src/main/java/eu/wdaqua/qanary/component/ned/gpt/GptBasedNamedEntityDisambiguation.java index 363b7673..fd1d2dbe 100644 --- a/qanary-component-NED-OpenAI-GPT/src/main/java/eu/wdaqua/qanary/component/ned/gpt/GptBasedNamedEntityDisambiguation.java +++ b/qanary-component-NED-OpenAI-GPT/src/main/java/eu/wdaqua/qanary/component/ned/gpt/GptBasedNamedEntityDisambiguation.java @@ -50,8 +50,6 @@ public class GptBasedNamedEntityDisambiguation extends QanaryComponent { private static final String FILENAME_SELECT_MAPPINGS_FROM_DBPEDIA = "/queries/select_mappings_from_DBpedia.rq"; private static final String FILENAME_INSERT_ONE_ANNOTATIONOFINSTANCE = "/queries/insert_one_AnnotationOfInstance.rq"; - private static final String START = "start"; - private static final String END = "end"; private static final String NAMEDENTITY = "named_entity"; private static final String WIKIPEDIAURL = "wikipedia_url"; diff --git a/qanary-component-NED-OpenAI-GPT/src/main/java/eu/wdaqua/qanary/component/ned/gpt/openai/OpenAiApiService.java b/qanary-component-NED-OpenAI-GPT/src/main/java/eu/wdaqua/qanary/component/ned/gpt/openai/OpenAiApiService.java index 58393a8f..1666fff9 100644 --- a/qanary-component-NED-OpenAI-GPT/src/main/java/eu/wdaqua/qanary/component/ned/gpt/openai/OpenAiApiService.java +++ b/qanary-component-NED-OpenAI-GPT/src/main/java/eu/wdaqua/qanary/component/ned/gpt/openai/OpenAiApiService.java @@ -59,6 +59,8 @@ public OpenAiApiService( // LOGGER.error("The API token was empty: '{}'. Please set the configuration property 'openai.api.key'.", this.token); throw new MissingArgumentException("openai.api.key is not avaible."); + } else { + LOGGER.info("API key available: {}*****{}", token.substring(0, 5), token.substring(token.length() - 5)); } } diff --git a/qanary-component-NED-OpenAI-GPT/src/main/resources/config/application.properties b/qanary-component-NED-OpenAI-GPT/src/main/resources/config/application.properties index eb6c03fe..53ec8493 100644 --- a/qanary-component-NED-OpenAI-GPT/src/main/resources/config/application.properties +++ b/qanary-component-NED-OpenAI-GPT/src/main/resources/config/application.properties @@ -68,7 +68,7 @@ openai.api.timeout=30 # maximum number of token retrieved by the API openai.api.maxToken=300 # live test of the Open AI API: flag -openai.api.live.test.active=false +openai.api.live.test.active=true # live test of the Open AI API: question to be used openai.api.live.test.question=Which state of the USA has the highest population density?