Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
anpl
Overview
Overview
Details
Activity
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
Ziyuan Nan
anpl
Commits
6ba580bf
Commit
6ba580bf
authored
May 08, 2023
by
nzy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix quit & add waiting info
parent
8092a6c6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletions
+6
-1
robotA.py
+2
-0
robotB.py
+4
-1
No files found.
robotA.py
View file @
6ba580bf
...
@@ -70,6 +70,8 @@ while not is_correct:
...
@@ -70,6 +70,8 @@ while not is_correct:
break
break
else
:
else
:
continue
continue
else
:
break
fun_name
=
fun_select
(
anpl
,
logger
,
cmd
==
"1"
or
cmd
==
"2"
)
fun_name
=
fun_select
(
anpl
,
logger
,
cmd
==
"1"
or
cmd
==
"2"
)
if
cmd
==
"1"
:
if
cmd
==
"1"
:
...
...
robotB.py
View file @
6ba580bf
...
@@ -32,7 +32,7 @@ while not is_correct:
...
@@ -32,7 +32,7 @@ while not is_correct:
history
.
append
(
new_message
)
history
.
append
(
new_message
)
logger
.
log
(
"user"
,
"chat"
,
new_message
)
logger
.
log
(
"user"
,
"chat"
,
new_message
)
system_info
(
"Waiting for ChatGPT..."
)
try
:
try
:
res
=
raw_query
(
history
,
model
=
"gpt-3.5-turbo"
,
max_tokens
=
1024
,
n
=
1
,
temperature
=
0
)
res
=
raw_query
(
history
,
model
=
"gpt-3.5-turbo"
,
max_tokens
=
1024
,
n
=
1
,
temperature
=
0
)
except
Exception
as
e
:
except
Exception
as
e
:
...
@@ -88,5 +88,7 @@ while not is_correct:
...
@@ -88,5 +88,7 @@ while not is_correct:
if
Confirm
.
ask
(
sys_str
+
"Less than 30 minutes. Do you really want to exit?"
):
if
Confirm
.
ask
(
sys_str
+
"Less than 30 minutes. Do you really want to exit?"
):
logger
.
log
(
"user"
,
"quit"
,
"force"
)
logger
.
log
(
"user"
,
"quit"
,
"force"
)
break
break
else
:
break
logger
.
log
(
"system"
,
"exit"
,
str
(
is_correct
))
logger
.
log
(
"system"
,
"exit"
,
str
(
is_correct
))
\ No newline at end of file
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