bklieger-groq / g1

g1: Using Llama-3.1 70b on Groq to create o1-like reasoning chains
MIT License
3.96k stars 357 forks source link

Final Answer should not use JSON #18

Closed oceanuo closed 2 months ago

oceanuo commented 2 months ago

Final Answer should not use JSON. I asked it to "Write a snake game," and the thought process was correct, but at the Final answer stage:

Failed to generate final answer after 3 attempts. Error: Error code: 400 - {'error': {'message': "Failed to generate JSON. Please adjust your prompt. See 'failed_generation' for more details.", 'type': 'invalid_request_error', 'code': 'json_validate_failed', 'failed_generation': '{"title": "Final Answer: Snake Game Implementation", "content": "Here is a simple implementation of the snake game in Python using Pygame:\n\n```python\nimport pygame\nimport sys\nimport random\n\n# Initialize Pygame\npygame.init()\n\n# Set up some constants\nWIDTH, HEIGHT = 800, 600\nSPEED = 10\nBLOCK_SIZE = 20\n\n# Set up some colors\nWHITE = (255, 255, 255)\nRED = (255, 0, 0)\nGREEN = (0, 255, 0)\n\n# Set up the display\nscreen = pygame.display.set_mode((WIDTH, HEIGHT))\n\n# Set up the font\nfont = pygame.font.Font(None, 36)\n\n# Set up the snake and food\nsnake = [(200, 200), (220, 200), (240, 200)]\nfood = (400, 300)\n\n# Set up the direction\ndirection = 'right'\n\n# Game loop'}}

bklieger-groq commented 2 months ago

That is a good idea. Final answer does not need to use JSON formatting. This is a to-do now.

bklieger-groq commented 2 months ago

This issue is resolved from changes in #develop. It will be deployed in the next PR from develop to main.