Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
T
TeleLlama3 Bot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mohamadbashar.disoki
TeleLlama3 Bot
Commits
fd6838ff
Commit
fd6838ff
authored
Apr 29, 2024
by
Mohamad Bashar Desoki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
empty response issue
parent
aca03e2e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
Bot.java
src/main/java/org/example/Bot.java
+10
-3
No files found.
src/main/java/org/example/Bot.java
View file @
fd6838ff
...
@@ -15,7 +15,7 @@ public class Bot extends TelegramLongPollingBot {
...
@@ -15,7 +15,7 @@ public class Bot extends TelegramLongPollingBot {
@Override
@Override
public
String
getBotToken
()
{
public
String
getBotToken
()
{
return
"Put your Telegram Token here
"
;
return
"Put your Telegram Token here"
;
}
}
private
String
prompts
;
private
String
prompts
;
...
@@ -27,8 +27,15 @@ public class Bot extends TelegramLongPollingBot {
...
@@ -27,8 +27,15 @@ public class Bot extends TelegramLongPollingBot {
llama3
l3
=
new
llama3
();
llama3
l3
=
new
llama3
();
prompts
=
msg
.
getText
();
prompts
=
msg
.
getText
();
String
resp
=
l3
.
llmChat
(
msg
.
getText
());
String
res
=
l3
.
llmChat
(
msg
.
getText
());
sendText
(
id
,
resp
+
" \n \uD83D\uDC50\uD83C\uDFFB please try again! \uD83D\uDE0A"
);
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
());
System
.
out
.
println
(
user
.
getFirstName
()
+
" wrote "
+
msg
.
getText
());
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment