Commit fd6838ff authored by Mohamad Bashar Desoki's avatar Mohamad Bashar Desoki

empty response issue

parent aca03e2e
......@@ -15,7 +15,7 @@ public class Bot extends TelegramLongPollingBot {
@Override
public String getBotToken() {
return "Put your Telegram Token here ";
return "Put your Telegram Token here";
}
private String prompts;
......@@ -27,8 +27,15 @@ public class Bot extends TelegramLongPollingBot {
llama3 l3 = new llama3();
prompts = msg.getText();
String resp = l3.llmChat(msg.getText());
sendText(id,resp + " \n \uD83D\uDC50\uD83C\uDFFB please try again! \uD83D\uDE0A");
String res = l3.llmChat(msg.getText());
String response;
if (res.length() > 0)
response = res + "\n \uD83D\uDC50\uD83C\uDFFB" ;
else
response = " \n \uD83D\uDC50\uD83C\uDFFB please try again! \uD83D\uDE0A";
sendText(id, response);
System.out.println(user.getFirstName() + " wrote " + msg.getText());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment