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

MetaGPT+Zhipu glm-4 generated the cli_blackjack game can not run #1251

Open
xiaotiancd opened this issue May 8, 2024 · 0 comments
Open

MetaGPT+Zhipu glm-4 generated the cli_blackjack game can not run #1251

xiaotiancd opened this issue May 8, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@xiaotiancd
Copy link

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

  • LLM type and model name: zhipu, glm-4
  • System version: MacOS 14.4.1,
  • Python version: 3.9
  • MetaGPT version or branch: dev version
  • packages version:
  • installation method: pip install from source

Screenshots or logs

@geekan geekan added the enhancement New feature or request label May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants