-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from bible-game/develop
Develop
- Loading branch information
Showing
3 changed files
with
73 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
projectName=config | ||
group=game.bible | ||
artifactDescription=The BLE Config Model (config) | ||
version=0.0.3-SNAPSHOT | ||
version=0.1.0-SNAPSHOT | ||
multiModule=false | ||
jiraCode=BLE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
src/main/kotlin/game/bible/config/model/integration/ChatGptConfig.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package game.bible.config.model.integration | ||
|
||
import game.bible.config.bean.Initialisable | ||
import game.bible.config.bean.Reloadable | ||
import org.slf4j.Logger | ||
import org.slf4j.LoggerFactory | ||
import java.io.Serial | ||
|
||
/** | ||
* ChatGPT Configuration | ||
* | ||
* @author J. R. Smith | ||
* @since 30th January 2025 | ||
*/ | ||
@Reloadable( | ||
prefix = "chat-gpt", | ||
path = "\${application.config.dir}") | ||
class ChatGptConfig : Initialisable { | ||
|
||
init { | ||
log.info("Created [{}]", this.javaClass.name) | ||
} | ||
|
||
private val apiKey: String? = null | ||
private val promptDeveloper: String? = null | ||
private val promptUser: String? = null | ||
|
||
fun getApiKey() = apiKey | ||
fun getPromptDeveloper() = promptDeveloper | ||
fun getPromptUser() = promptUser | ||
// Note: this getter is required or proxying this field fails | ||
|
||
companion object { | ||
@Serial private val serialVersionUID = 3578565273432319L | ||
|
||
private val log: Logger = LoggerFactory.getLogger(ChatGptConfig::class.java) | ||
} | ||
|
||
} |