We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
ClovaPromptProperties.java
1 parent fe2241b commit f4c9e48Copy full SHA for f4c9e48
1 file changed
src/main/java/boombimapi/global/properties/ClovaPromptProperties.java
@@ -1,10 +1,22 @@
1
package boombimapi.global.properties;
2
3
+import java.nio.charset.StandardCharsets;
4
+import java.util.Base64;
5
import org.springframework.boot.context.properties.ConfigurationProperties;
6
7
@ConfigurationProperties(prefix = "clova.prompts")
8
public record ClovaPromptProperties(
9
String autoCompleteCongestionMessage
10
) {
11
12
+ public String autoCompleteCongestionMessage() {
13
+ if (autoCompleteCongestionMessage == null || autoCompleteCongestionMessage.isBlank()) {
14
+ return "";
15
+ }
16
+ // 혹시 공백/개행 들어오면 제거
17
+ String compact = autoCompleteCongestionMessage.replaceAll("\\s+", "");
18
+ byte[] decoded = Base64.getDecoder().decode(compact);
19
+ return new String(decoded, StandardCharsets.UTF_8);
20
21
+
22
}
0 commit comments