Skip to content

Commit

Permalink
added /help
Browse files Browse the repository at this point in the history
  • Loading branch information
mjfelis committed Nov 11, 2024
1 parent b2c7ec7 commit 9746715
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@ public class Service {
private static String CMD_ROOT_MENU_NO_CRED = "/nocred";
private static String CMD_ROOT_MENU_OPTION1 = "/option1";
private static String CMD_ROOT_MENU_LOGOUT = "/logout";
private static String CMD_ROOT_MENU_TO = "/to";

private static String CMD_ROOT_MENU_HELP = "/help";

private static String CMD_ROOT_MENU_SET_MODEL = "/set";

Expand Down Expand Up @@ -507,7 +508,13 @@ public void userInput(BaseMessage message) throws Exception {
}
mtProducer.sendMessage(TextMessage.build(message.getConnectionId(), message.getThreadId() , this.getMessage("UNAUTHENTICATED")));

} else if (content.equals(CMD_ROOT_MENU_CLEAR.toString())) {
} else if (content.equals(CMD_ROOT_MENU_HELP.toString())) {

mtProducer.sendMessage(TextMessage.build(message.getConnectionId(), message.getThreadId() , this.getMessage("USAGE")));

}

else if (content.equals(CMD_ROOT_MENU_CLEAR.toString())) {

if (session != null) {
Query q = em.createNamedQuery("History.delete");
Expand Down Expand Up @@ -661,6 +668,8 @@ public BaseMessage getRootMenu(UUID connectionId, Session session) {

}

options.add(ContextualMenuItem.build(CMD_ROOT_MENU_HELP, this.getMessage("ROOT_MENU_HELP"), null));

options.add(ContextualMenuItem.build(CMD_ROOT_MENU_LOGOUT, this.getMessage("ROOT_MENU_LOGOUT"), null));

}
Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/META-INF/resources/Messages_en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ ROOT_MENU_NO_CRED=Get an Identity Card
ROOT_MENU_LOGOUT=Logout
ROOT_MENU_DEFAULT_DESCRIPTION=You are not authenticated
ROOT_MENU_AUTHENTICATED_DESCRIPTION=Welcome NAME! Selected model: MODEL
ROOT_MENU_HELP=Help
ERROR=Ask me something.
FACE_VERIFICATION_HEADER=Face Verification
FACE_VERIFICATION_DESC=Start Face Verification to Authenticate yourself
UNAUTHENTICATED=You are now unauthenticated.
SUCCESS=Transaction successful. TX
WAIT=MESSAGE: Service unavailable, or to many requests to this address. Please wait.
USAGE=Ask me something.
USAGE=Ask me something. At any time use /clear to purge chat history.
ERROR_NOT_AUTHENTICATED=You need to prove you're human to use this service. Check the contextual menu and authenticate yourself.
CMD_ROOT_MENU_SET_MODEL_TEXT=Switch to MODEL model
SET_MODEL=Model set to MODEL. Use the contextual menu to switch to another model.
Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/META-INF/resources/Messages_es.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ ROOT_MENU_NO_CRED=Obtiene tu documento de Identidad
ROOT_MENU_LOGOUT=Desconectarse
ROOT_MENU_DEFAULT_DESCRIPTION=No estas autenticado
ROOT_MENU_AUTHENTICATED_DESCRIPTION=¡Bienvenido NAME!
ROOT_MENU_HELP=Ayuda
ERROR=Pregúntame algo.
FACE_VERIFICATION_HEADER=Verificación biométrica
FACE_VERIFICATION_DESC=Autentícate con tu rostro
UNAUTHENTICATED=Estas desconectado.
SUCCESS=Transaction successful. TX
WAIT=MESSAGE: Service unavailable, or to many requests to this address. Please wait.
USAGE=Pregúntame algo.
USAGE=Pregúntame algo. Escribe /clear para borrar el historial de platica.
ERROR_NOT_AUTHENTICATED=Debes demostrar eres hunamo para usar este servicio. Accede al menú contextual para ver las opciones disponibles.
CMD_ROOT_MENU_SET_MODEL_TEXT=Usar el modelo MODEL
SET_MODEL=Modelo seleccionado: MODEL. Usar el menú contextual para cambiar de modelo.
Expand Down
4 changes: 3 additions & 1 deletion src/main/resources/META-INF/resources/Messages_fr.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,17 @@ ROOT_MENU_NO_CRED=Obtenir une Attestation d'Identité
ROOT_MENU_LOGOUT=Se Deconnecter
ROOT_MENU_DEFAULT_DESCRIPTION=Vous n'êtes pas authentifié
ROOT_MENU_AUTHENTICATED_DESCRIPTION=Bienvenue NAME!
ROOT_MENU_HELP=Aide
ERROR=Pose moi une question.
FACE_VERIFICATION_HEADER=Vérification biométrique
FACE_VERIFICATION_DESC=Authentifiez-vous avec votre visage
UNAUTHENTICATED=Vous êtes déconnecté.
SUCCESS=Transaction OK. TX
WAIT=MESSAGE: Service indisponible, ou trop d'envois à la même adresse. Reessayer avec une autre adresse ou dans un moment.
USAGE=Pose moi une question.
USAGE=Pose moi une question. Envoie /clear pour purger l'historique.
ERROR_NOT_AUTHENTICATED=Vous devez prouver que vous êtes humain pour utiliser ce service. Veuillez lancer l'autentication depuis le menu contextuel.
CMD_ROOT_MENU_SET_MODEL_TEXT=Utiliser le modèle MODEL
SET_MODEL=Modèle selectionné: MODEL. Utiliser le menu contextuel pour changer de modèle.
SET_MODEL_ERROR=Le modèle MODEL n'est pas disponible sur le serveur ollama. Utiliser le menu contextuel pour changer de modèle.
CLEANED_HISTORY=J'ai tout oublié.

0 comments on commit 9746715

Please sign in to comment.