Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running the gpt-structure.py file, an error occurred: NameError: name 'GPT_request' is not defined. But there is no GPT_request method in the original code, what's the situation #161

Open
wwwzxxzw opened this issue Jul 20, 2024 · 2 comments

Comments

@wwwzxxzw
Copy link

Running the gpt-structure.py file, an error occurred: NameError: name 'GPT_request' is not defined. But there is no GPT_request method in the original code, what's the situation

@wwwzxxzw
Copy link
Author

After executing the Enter option: run 10, the terminal error is as follows:
GNS FUNCTION: <generate_wake_up_hour>
Traceback (most recent call last):
File "D:\pycharm2023\Project Location\3、generative_agents-main\reverie\backend_server\reverie.py", line 468, in open_server
rs.start_server(int_count)
File "D:\pycharm2023\Project Location\3、generative_agents-main\reverie\backend_server\reverie.py", line 379, in start_server
next_tile, pronunciatio, description = persona.move(
File "D:\pycharm2023\Project Location\3、generative_agents-main\reverie\backend_server\persona\persona.py", line 222, in move
plan = self.plan(maze, personas, new_day, retrieved)
File "D:\pycharm2023\Project Location\3、generative_agents-main\reverie\backend_server\persona\persona.py", line 148, in plan
return plan(self, maze, personas, new_day, retrieved)
File "D:\pycharm2023\Project Location\3、generative_agents-main\reverie\backend_server\persona\cognitive_modules\plan.py", line 955, in plan
_long_term_planning(persona, new_day)
File "D:\pycharm2023\Project Location\3、generative_agents-main\reverie\backend_server\persona\cognitive_modules\plan.py", line 472, in _long_term_planning
wake_up_hour = generate_wake_up_hour(persona)
File "D:\pycharm2023\Project Location\3、generative_agents-main\reverie\backend_server\persona\cogniive_modules\plan.py", line 38, in generate_wake_up_hour
return int(run_gpt_prompt_wake_up_hour(persona)[0])
File "D:\pycharm2023\Project Location\3、generative_agents-main\reverie\backend_server\persona\promp_template\run_gpt_prompt.py", line 77, in run_gpt_prompt_wake_up_hour
output = safe_generate_response(prompt, gpt_param, 5, fail_safe,
File "D:\pycharm2023\Project Location\3、generative_agents-main\reverie\backend_server\persona\promp_template\gpt_structure.py", line 139, in safe_generate_response
curr_gpt_response = GPT_request(prompt, gpt_parameter)
NameError: name 'GPT_request' is not defined
Error.

@drudilorenzo
Copy link

Hey, try my fork: https://github.com/drudilorenzo/generative_agents

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants