Closed xiaotiancd closed 23 hours ago
I met the same problem, it seems that zhipu glm-4 is bad at code generation.
Due to the lack of updates or replies by the user for a long time, we will close it. Please reopen it if necessary.
This issue has been closed because it took too long.
Bug description
looks like the generated code has dependency issues among the classes.
% python main.py Do you want to play a game of Blackjack? [Y/n] Y Traceback (most recent call last): File "/Users/xuxiaotian/project/metaGPT/MetaGPT/workspace/cli_blackjack/cli_blackjack/main.py", line 98, in
main()
File "/Users/xuxiaotian/project/metaGPT/MetaGPT/workspace/cli_blackjack/cli_blackjack/main.py", line 94, in main
game.play()
File "/Users/xuxiaotian/project/metaGPT/MetaGPT/workspace/cli_blackjack/cli_blackjack/main.py", line 19, in play
if not self.player.bet(10): # Default bet amount is 10
File "/Users/xuxiaotian/project/metaGPT/MetaGPT/workspace/cli_blackjack/cli_blackjack/player.py", line 26, in bet
self.hands.append(Hand()) # Add a new hand for the player
NameError: name 'Hand' is not defined
Bug solved method
Environment information
Screenshots or logs