joonspk-research / generative_agents

Generative Agents: Interactive Simulacra of Human Behavior
Apache License 2.0
16.26k stars 2.09k forks source link

string index out of range #154

Open flameleo11 opened 4 months ago

flameleo11 commented 4 months ago

INPUT_SIMULATION_FORK = "base_the_ville_isabella_maria_klaus" INPUT_SIMULATION_NAME = "t5"

run 1

Name: Isabella Rodriguez
Age: 34
Innate traits: friendly, outgoing, hospitable
Learned traits: Isabella Rodriguez is a cafe owner of Hobbs Cafe who loves to make people feel welcome. She is always looking for ways to make the cafe a place where people can come to relax and enjoy themselves.
Currently: Isabella Rodriguez is planning on having a Valentine's Day party at Hobbs Cafe with her customers on February 14th, 2023 at 5pm. She is gathering party material, and is telling everyone to join the party at Hobbs Cafe on February 14th, 2023, from 5pm to 7pm.
Lifestyle: Is
-==- -==- -==- 
Traceback (most recent call last):
  File "/drive_d/work_demo/generative_agents/reverie/backend_server/reverie.py", line 468, in open_server
    rs.start_server(int_count)
  File "/drive_d/work_demo/generative_agents/reverie/backend_server/reverie.py", line 379, in start_server
    next_tile, pronunciatio, description = persona.move(
  File "/drive_d/work_demo/generative_agents/reverie/backend_server/persona/persona.py", line 222, in move
    plan = self.plan(maze, personas, new_day, retrieved)
  File "/drive_d/work_demo/generative_agents/reverie/backend_server/persona/persona.py", line 148, in plan
    return plan(self, maze, personas, new_day, retrieved)
  File "/drive_d/work_demo/generative_agents/reverie/backend_server/persona/cognitive_modules/plan.py", line 959, in plan
    _determine_action(persona, maze)
  File "/drive_d/work_demo/generative_agents/reverie/backend_server/persona/cognitive_modules/plan.py", line 579, in _determine_action
    generate_task_decomp(persona, act_desp, act_dura))
  File "/drive_d/work_demo/generative_agents/reverie/backend_server/persona/cognitive_modules/plan.py", line 164, in generate_task_decomp
    return run_gpt_prompt_task_decomp(persona, task, duration)[0]
  File "/drive_d/work_demo/generative_agents/reverie/backend_server/persona/prompt_template/run_gpt_prompt.py", line 443, in run_gpt_prompt_task_decomp
    output = safe_generate_response(prompt, gpt_param, 5, get_fail_safe(),
  File "/drive_d/work_demo/generative_agents/reverie/backend_server/persona/prompt_template/gpt_structure.py", line 291, in safe_generate_response
    return func_clean_up(curr_gpt_response, prompt=prompt)
  File "/drive_d/work_demo/generative_agents/reverie/backend_server/persona/prompt_template/run_gpt_prompt.py", line 380, in __func_clean_up
    if task[-1] == ".":
IndexError: string index out of range
Error.
Enter option: 
Alice1998 commented 2 months ago

Facing the same problem

PandaraWen commented 4 weeks ago

Similar problem here:

Today is February 13, 2023. From 00:00AM ~ 00:00AM, Isabella Rodriguez is planning on TOKEN LIMIT EXCEEDED. In 5 min increments, list the subtasks Isabella does when Isabella is TOKEN LIMIT EXCEEDED from (total duration in minutes 1440): 1) Isabella is TOKEN LIMIT EXCEEDED TOODOOOOOO TOKEN LIMIT EXCEEDED -==- -==- -==- TOODOOOOOO TOKEN LIMIT EXCEEDED -==- -==- -==- Traceback (most recent call last): File "/WorkSpace/generative_agents/reverie/backend_server/reverie.py", line 468, in open_server rs.start_server(int_count) File "/WorkSpace/generative_agents/reverie/backend_server/reverie.py", line 379, in start_server next_tile, pronunciatio, description = persona.move( File "/WorkSpace/generative_agents/reverie/backend_server/persona/persona.py", line 222, in move plan = self.plan(maze, personas, new_day, retrieved) File "/WorkSpace/generative_agents/reverie/backend_server/persona/persona.py", line 148, in plan return plan(self, maze, personas, new_day, retrieved) File "/WorkSpace/generative_agents/reverie/backend_server/persona/cognitive_modules/plan.py", line 959, in plan _determine_action(persona, maze) File "/WorkSpace/generative_agents/reverie/backend_server/persona/cognitive_modules/plan.py", line 573, in _determine_action generate_task_decomp(persona, act_desp, act_dura)) File "/WorkSpace/generative_agents/reverie/backend_server/persona/cognitive_modules/plan.py", line 164, in generate_task_decomp return run_gpt_prompt_task_decomp(persona, task, duration)[0] File "/WorkSpace/generative_agents/reverie/backend_server/persona/prompt_template/run_gpt_prompt.py", line 439, in run_gpt_prompt_task_decomp output = safe_generate_response(prompt, gpt_param, 5, get_fail_safe(), File "/WorkSpace/generative_agents/reverie/backend_server/persona/prompt_template/gpt_structure.py", line 268, in safe_generate_response return func_clean_up(curr_gpt_response, prompt=prompt) File "/WorkSpace/generative_agents/reverie/backend_server/persona/prompt_template/run_gpt_prompt.py", line 378, in __func_clean_up duration = int(k[1].split(",")[0].strip()) IndexError: list index out of range Error.