Closed borick closed 7 months ago
Looks like the LLM responded with JSON that's slightly off from what we expect (it used key content
instead of contents
).
We need better error handling here
Thanks for all the reports btw! This is super helpful.
PR opened here: https://github.com/OpenDevin/OpenDevin/pull/196
Should be fixed now!
Describe the bug
Steps to Reproduce
Expected behavior
PS C:\Users\boris\thirdparty\OpenDevin> uvicorn opendevin.server.listen:app --port 3000 INFO: Started server process [120364] INFO: Waiting for application startup. INFO: Application startup complete. INFO: Uvicorn running on http://127.0.0.1:3000 (Press CTRL+C to quit) INFO: ('127.0.0.1', 56342) - "WebSocket /ws" [accepted] INFO: connection open
============== STEP 0
============== STEP 1
============== STEP 2
============== STEP 3
============== STEP 4
============== STEP 5
============== STEP 6
============== STEP 7
============== STEP 8
============== STEP 9
============== STEP 10
============== STEP 11
FileWriteAction(path='game.py', contents='import pygame\nimport sys\n\npygame.init()\n\nsize = width, height = 640, 480\nscreen = pygame.display.set_mode(size)\n\nplayer = pygame.Rect(100, 100, 60, 60)\nplayer_speed = [2, 2]\nenemies = []\n\nwhile 1:\n for event in pygame.event.get():\n if event.type == pygame.QUIT: sys.exit()\n\n player = player.move(player_speed)\n if player.left < 0 or player.right > width:\n player_speed[0] = -player_speed[0]\n if player.top < 0 or player.bottom > height:\n player_speed[1] = -player_speed[1]\n\n screen.fill((0, 0, 0))\n screen.fill((255, 0, 0), player)\n pygame.display.flip()\n', base_path='.')
============== STEP 12
============== STEP 13 Error in loop FileWriteAction.init() got an unexpected keyword argument 'content' Traceback (most recent call last): File "C:\Users\boris\thirdparty\OpenDevin\opendevin\controller__init.py", line 61, in start_loop finished = await self.step(i) File "C:\Users\boris\thirdparty\OpenDevin\opendevin\controller__init__.py", line 81, in step action: Action = self.agent.step(state) File "C:\Users\boris\thirdparty\OpenDevin\agenthub\langchains_agent__init__.py", line 177, in step action = prompts.parse_action_response(action_resp) File "C:\Users\boris\thirdparty\OpenDevin\agenthub\langchains_agent\utils\prompts.py", line 166, in parse_action_response action = ACTION_TYPE_TO_CLASSaction_dict["action"] TypeError: FileWriteAction.init__() got an unexpected keyword argument 'content' Exited before finishing Additional context It's all there, thank you