Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -230,7 +230,7 @@ def call_main(purpose, task, history, action_input):
|
|
230 |
resp = run_gpt(
|
231 |
FINDER,
|
232 |
stop_tokens=["observation:", "task:","action:"],
|
233 |
-
max_tokens=
|
234 |
seed=random.randint(1,1000000000),
|
235 |
purpose=purpose,
|
236 |
task=task,
|
@@ -242,10 +242,7 @@ def call_main(purpose, task, history, action_input):
|
|
242 |
continue
|
243 |
if line.startswith("thought: "):
|
244 |
history += "{}\n".format(line)
|
245 |
-
if line.startswith("action:
|
246 |
-
print("COMPLETE called")
|
247 |
-
return "COMPLETE", None, history, task
|
248 |
-
if line.startswith("action:"):
|
249 |
action_name, action_input = parse_action(line)
|
250 |
print(f'ACTION::{action_name} -- INPUT :: {action_input}')
|
251 |
history += "{}\n".format(line)
|
@@ -422,7 +419,7 @@ def run(purpose,history):
|
|
422 |
history = ""
|
423 |
else:
|
424 |
history=str(history)
|
425 |
-
action_name = "
|
426 |
action_input = None
|
427 |
while True:
|
428 |
print("")
|
|
|
230 |
resp = run_gpt(
|
231 |
FINDER,
|
232 |
stop_tokens=["observation:", "task:","action:"],
|
233 |
+
max_tokens=2096,
|
234 |
seed=random.randint(1,1000000000),
|
235 |
purpose=purpose,
|
236 |
task=task,
|
|
|
242 |
continue
|
243 |
if line.startswith("thought: "):
|
244 |
history += "{}\n".format(line)
|
245 |
+
if line.startswith("action: "):
|
|
|
|
|
|
|
246 |
action_name, action_input = parse_action(line)
|
247 |
print(f'ACTION::{action_name} -- INPUT :: {action_input}')
|
248 |
history += "{}\n".format(line)
|
|
|
419 |
history = ""
|
420 |
else:
|
421 |
history=str(history)
|
422 |
+
action_name = "MAIN"
|
423 |
action_input = None
|
424 |
while True:
|
425 |
print("")
|