Compare commits
2 commits
dbf6e17bfb
...
1ce2658b55
Author | SHA1 | Date | |
---|---|---|---|
1ce2658b55 | |||
f0731e6754 |
2 changed files with 8 additions and 1 deletions
|
@ -38,6 +38,7 @@ public class DiscordBot implements Runnable {
|
|||
.setToken(discordApiKey)
|
||||
.login()
|
||||
.join();
|
||||
discordApi.setMessageCacheSize(10, 60*60);
|
||||
var future = new CompletableFuture<Void>();
|
||||
Runtime.getRuntime().addShutdownHook(Thread.ofVirtual().unstarted(() -> {
|
||||
logger.info("Shutting down Discord application");
|
||||
|
|
|
@ -4,7 +4,13 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
public record ChatGPTResponse(String id, String object, long created, String model, Usage usage, List<Choice> choices) {
|
||||
public record ChatGPTResponse(String id,
|
||||
String object,
|
||||
long created,
|
||||
String model,
|
||||
Usage usage,
|
||||
List<Choice> choices,
|
||||
@JsonProperty("system_fingerprint") String systemFingerprint) {
|
||||
|
||||
public record Usage(@JsonProperty("prompt_tokens") int promptTokens,
|
||||
@JsonProperty("completion_tokens") int completionTokens,
|
||||
|
|
Loading…
Reference in a new issue