From 7cbe735c3c285dabf7f949487e626a6ca8b9cf5e Mon Sep 17 00:00:00 2001 From: Minecon724 Date: Thu, 5 Sep 2024 16:28:20 +0200 Subject: [PATCH] tweak displaying options --- src/main/java/eu/m724/chatapi/Main.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/eu/m724/chatapi/Main.java b/src/main/java/eu/m724/chatapi/Main.java index cb54e9e..bb384b4 100644 --- a/src/main/java/eu/m724/chatapi/Main.java +++ b/src/main/java/eu/m724/chatapi/Main.java @@ -35,6 +35,7 @@ class Main { complainedApiKey = true; } + //ChatSource source = new ExampleSource(); ChatSource source = new OaiSource(apiKey); source.options().setValue("model", "chatgpt-4o-latest"); @@ -140,15 +141,15 @@ class Main { System.out.println("Available options:"); for (Option option : options.getOptions()) { - String value = option.toString() + " (" + option.getType().getName() + ")"; + String value = option.getValue().toString(); if (option.id.equals(chosenOption)) { - System.out.printf("\033[1m%s (%s) = %s\033[0m\n", option.label, option.id, value); + System.out.printf("\033[1m%s (%s) = %s (%s)\033[0m\n", option.label, option.id, value, option.getType().getName()); } else { if (option.label.toLowerCase().contains("key")) { value = "(looks confidential, specify to see)"; } - System.out.printf("%s (%s) = %s\n", option.label, option.id, value); + System.out.printf("%s (%s) = %s (%s)\n", option.label, option.id, value, option.getType().getSimpleName()); } } }