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

Error in rendering to language model [Bug] #468

Closed
7 tasks
start-life opened this issue Apr 21, 2024 · 3 comments
Closed
7 tasks

Error in rendering to language model [Bug] #468

start-life opened this issue Apr 21, 2024 · 3 comments

Comments

@start-life
Copy link

Microsoft Windows [Version 10.0.22631.3447]
(c) Microsoft Corporation. כל הזכויות שמורות.

C:\zxcv\devika>.venv\Scripts\activate

(devika) C:\zxcv\devika>python devika.py
24.04.21 14:41:53: root: INFO : Initializing Devika...
24.04.21 14:41:53: root: INFO : Initializing Prerequisites Jobs...
24.04.21 14:41:59: root: INFO : Loading sentence-transformer BERT models...
24.04.21 14:42:06: root: INFO : BERT model loaded successfully.
24.04.21 14:42:10: root: INFO : Ollama available
24.04.21 14:42:11: root: INFO : Devika is up and running!
24.04.21 14:45:25: root: INFO : /api/data GET
24.04.21 14:45:25: root: DEBUG : /api/data GET - Response: {"models":{"CLAUDE":[["Claude 3 Opus","claude-3-opus-20240229"],["Claude 3 Sonnet","claude-3-sonnet-20240229"],["Claude 3 Haiku","claude-3-haiku-20240307"]],"GOOGLE":[["Gemini 1.0 Pro","gemini-pro"]],"GROQ":[["LLAMA3 8B","llama3-8b-8192"],["LLAMA3 70B","llama3-70b-8192"],["LLAMA2 70B","llama2-70b-4096"],["Mixtral","mixtral-8x7b-32768"],["GEMMA 7B","gemma-7b-it"]],"MISTRAL":[["Mistral 7b","open-mistral-7b"],["Mistral 8x7b","open-mixtral-8x7b"],["Mistral Medium","mistral-medium-latest"],["Mistral Small","mistral-small-latest"],["Mistral Large","mistral-large-latest"]],"OLLAMA":[["codellama","codellama:7b"],["llama3","llama3:latest"]],"OPENAI":[["GPT-4 Turbo","gpt-4-turbo"],["GPT-3.5 Turbo","gpt-3.5-turbo-0125"]]},"projects":["1234"],"search_engines":["Bing","Google","DuckDuckGo"]}

Socket connected :: {'data': 'frontend connected!'}
24.04.21 14:45:25: root: INFO : SOCKET socket_response MESSAGE: {'data': 'Server Connected'}
24.04.21 14:45:25: root: INFO : /api/get-agent-state POST
24.04.21 14:45:25: root: DEBUG : /api/get-agent-state POST - Response: {"state":null}

24.04.21 14:45:30: root: INFO : /api/get-agent-state POST
24.04.21 14:45:30: root: DEBUG : /api/get-agent-state POST - Response: {"state":{"agent_is_active":true,"browser_session":{"screenshot":null,"url":null},"completed":false,"internal_monologue":"I'm excited to dive into this project! I'll start by researching some existing libraries or frameworks that can help with creating a graphical interface, like Pygame or Tkinter. That should save me some time and effort implementing graphics from scratch.","message":null,"step":null,"terminal_session":{"command":null,"output":null,"title":null},"timestamp":"2024-04-21 14:30:22","token_usage":66425}}

24.04.21 14:45:59: root: INFO : /api/create-project POST
24.04.21 14:45:59: root: DEBUG : /api/create-project POST - Response: {"message":"Project created"}

24.04.21 14:45:59: root: INFO : /api/get-agent-state POST
24.04.21 14:45:59: root: DEBUG : /api/get-agent-state POST - Response: {"state":null}

24.04.21 14:46:10: root: INFO : SOCKET server-message MESSAGE: {'messages': {'from_devika': False, 'message': 'Write me code for a Snake game with a graphical interface, control with the arrows on the keyboard, and indicate the score for the user, and optimize the code', 'timestamp': '2024-04-21 14:46:10'}}
24.04.21 14:46:10: root: INFO : SOCKET tokens MESSAGE: {'token_usage': 788}
Model: llama3:latest, Enum: OLLAMA
24.04.21 14:46:32: root: INFO : /api/get-agent-state POST
24.04.21 14:46:32: root: DEBUG : /api/get-agent-state POST - Response: {"state":{"agent_is_active":true,"browser_session":{"screenshot":null,"url":null},"completed":false,"internal_monologue":null,"message":null,"step":null,"terminal_session":{"command":null,"output":null,"title":null},"timestamp":"2024-04-21 14:46:10","token_usage":394}}

24.04.21 14:46:40: root: INFO : SOCKET tokens MESSAGE: {'token_usage': 1250}

plan :: ```
Project Name: Snake Game with Graphical Interface
Your Reply to the Human Prompter: I'm creating a step-by-step plan to develop a Snake game with a graphical interface, controlled by keyboard arrows, and displaying a score for the user.
Current Focus: Developing a functional Snake game that meets the user's requirements.

Plan:

  • Step 1: Choose a programming language and framework to build the game. Research and select a suitable language and framework, such as Python with Pygame or Java with Swing, considering factors like ease of use, graphics capabilities, and compatibility.
  • Step 2: Set up the game's basic structure. Create a new project in the chosen framework, define the game loop, and initialize essential variables like screen dimensions, font styles, and colors.
  • Step 3: Design the graphical interface. Implement a game window with a grid background, display the score, and draw the snake body using graphics primitives (e.g., lines, rectangles).
  • Step 4: Implement keyboard control for the snake movement. Use event handling to detect arrow key presses and update the snake's position accordingly.
  • Step 5: Add game logic for the snake's behavior. Implement rules like collision detection with walls, self-collision, or eating food pellets, which will affect the score and game state.
  • Step 6: Develop the scoring system. Update the score when the snake eats a pellet, and display it on the screen.
  • Step 7: Test the game for functionality, performance, and usability. Verify that the game responds to keyboard input, scores are accurate, and the graphics are smooth.

Summary:
This plan outlines the development of a Snake game with a graphical interface, controlled by keyboard arrows, and displaying a score for the user. The key consideration is choosing an appropriate programming language and framework to ensure compatibility and ease of use. The main dependencies will be the chosen framework's documentation and any necessary libraries or modules. Potential challenges may arise from optimizing graphics performance, handling edge cases in game logic, and ensuring consistent scoring.

24.04.21 14:46:40: root: INFO : SOCKET agent-state MESSAGE: [{'internal_monologue': None, 'browser_session': {'url': None, 'screenshot': None}, 'terminal_session': {'command': None, 'output': None, 'title': None}, 'step': None, 'message': None, 'completed': False, 'agent_is_active': True, 'token_usage': 822, 'timestamp': '2024-04-21 14:46:10'}]
24.04.21 14:46:40: root: INFO : SOCKET server-message MESSAGE: {'messages': {'from_devika': True, 'message': "I'm creating a step-by-step plan to develop a Snake game with a graphical interface, controlled by keyboard arrows, and displaying a score for the user.", 'timestamp': '2024-04-21 14:46:40'}}
24.04.21 14:46:40: root: INFO : SOCKET server-message MESSAGE: {'messages': {'from_devika': True, 'message': '{\n "1": "Choose a programming language and framework to build the game. Research and select a suitable language and framework, such as Python with Pygame or Java with Swing, considering factors like ease of use, graphics capabilities, and compatibility.",\n "2": "Set up the game's basic structure. Create a new project in the chosen framework, define the game loop, and initialize essential variables like screen dimensions, font styles, and colors.",\n "3": "Design the graphical interface. Implement a game window with a grid background, display the score, and draw the snake body using graphics primitives (e.g., lines, rectangles).",\n "4": "Implement keyboard control for the snake movement. Use event handling to detect arrow key presses and update the snake's position accordingly.",\n "5": "Add game logic for the snake's behavior. Implement rules like collision detection with walls, self-collision, or eating food pellets, which will affect the score and game state.",\n "6": "Develop the scoring system. Update the score when the snake eats a pellet, and display it on the screen.",\n "7": "Test the game for functionality, performance, and usability. Verify that the game responds to keyboard input, scores are accurate, and the graphics are smooth. "\n}', 'timestamp': '2024-04-21 14:46:40'}}

context_keywords :: ['snake', 'game', 'functional', 'developing', 'requirements']

24.04.21 14:46:43: root: INFO : SOCKET tokens MESSAGE: {'token_usage': 1926}
Model: llama3:latest, Enum: OLLAMA
24.04.21 14:46:47: root: INFO : SOCKET tokens MESSAGE: {'token_usage': 1588}
Invalid response from the model, trying again...
24.04.21 14:46:47: root: INFO : SOCKET tokens MESSAGE: {'token_usage': 2585}
Model: llama3:latest, Enum: OLLAMA
24.04.21 14:46:50: root: INFO : SOCKET tokens MESSAGE: {'token_usage': 2173}
Invalid response from the model, trying again...
24.04.21 14:46:50: root: INFO : SOCKET tokens MESSAGE: {'token_usage': 3207}
Model: llama3:latest, Enum: OLLAMA
24.04.21 14:46:52: root: INFO : SOCKET tokens MESSAGE: {'token_usage': 2811}
Invalid response from the model, trying again...
24.04.21 14:46:52: root: INFO : SOCKET tokens MESSAGE: {'token_usage': 3837}
Model: llama3:latest, Enum: OLLAMA
24.04.21 14:46:54: root: INFO : SOCKET tokens MESSAGE: {'token_usage': 3373}

internal_monologue :: Hmm, I'm thinking about choosing a programming language for this Snake game... Python with Pygame seems like a great option, it's easy to use and has good graphics capabilities.

24.04.21 14:46:54: root: INFO : SOCKET agent-state MESSAGE: [{'internal_monologue': None, 'browser_session': {'url': None, 'screenshot': None}, 'terminal_session': {'command': None, 'output': None, 'title': None}, 'step': None, 'message': None, 'completed': False, 'agent_is_active': True, 'token_usage': 3329, 'timestamp': '2024-04-21 14:46:10'}, {'internal_monologue': "Hmm, I'm thinking about choosing a programming language for this Snake game... Python with Pygame seems like a great option, it's easy to use and has good graphics capabilities.", 'browser_session': {'url': None, 'screenshot': None}, 'terminal_session': {'command': None, 'output': None, 'title': None}, 'step': None, 'message': None, 'completed': False, 'agent_is_active': True, 'token_usage': 0, 'timestamp': '2024-04-21 14:46:54'}]
24.04.21 14:46:54: root: INFO : SOCKET tokens MESSAGE: {'token_usage': 2016}
Model: llama3:latest, Enum: OLLAMA
24.04.21 14:47:03: root: INFO : SOCKET tokens MESSAGE: {'token_usage': 1752}
Invalid response from the model, trying again...
24.04.21 14:47:03: root: INFO : SOCKET tokens MESSAGE: {'token_usage': 3396}
Model: llama3:latest, Enum: OLLAMA
24.04.21 14:47:13: root: INFO : SOCKET tokens MESSAGE: {'token_usage': 3076}
Invalid response from the model, trying again...
24.04.21 14:47:13: root: INFO : SOCKET tokens MESSAGE: {'token_usage': 4748}
Model: llama3:latest, Enum: OLLAMA
24.04.21 14:47:21: root: INFO : SOCKET tokens MESSAGE: {'token_usage': 4378}
Invalid response from the model, trying again...
24.04.21 14:47:21: root: INFO : SOCKET tokens MESSAGE: {'token_usage': 6075}
Model: llama3:latest, Enum: OLLAMA
24.04.21 14:47:31: root: INFO : SOCKET tokens MESSAGE: {'token_usage': 5819}
Invalid response from the model, trying again...
24.04.21 14:47:31: root: INFO : SOCKET tokens MESSAGE: {'token_usage': 7459}
Model: llama3:latest, Enum: OLLAMA
24.04.21 14:47:41: root: INFO : SOCKET tokens MESSAGE: {'token_usage': 7179}
Invalid response from the model, trying again...
24.04.21 14:47:41: root: INFO : SOCKET tokens MESSAGE: {'token_usage': 8831}
Model: llama3:latest, Enum: OLLAMA
24.04.21 14:47:49: root: INFO : SOCKET tokens MESSAGE: {'token_usage': 8383}
Invalid response from the model, trying again...
24.04.21 14:47:49: root: INFO : SOCKET tokens MESSAGE: {'token_usage': 10119}
Model: llama3:latest, Enum: OLLAMA
24.04.21 14:47:59: root: INFO : SOCKET tokens MESSAGE: {'token_usage': 9869}
Invalid response from the model, trying again...
24.04.21 14:47:59: root: INFO : SOCKET tokens MESSAGE: {'token_usage': 11506}
Model: llama3:latest, Enum: OLLAMA
24.04.21 14:48:06: root: INFO : SOCKET tokens MESSAGE: {'token_usage': 11144}
Invalid response from the model, trying again...
24.04.21 14:48:06: root: INFO : SOCKET tokens MESSAGE: {'token_usage': 12837}
Model: llama3:latest, Enum: OLLAMA
24.04.21 14:48:15: root: INFO : SOCKET tokens MESSAGE: {'token_usage': 12557}
Invalid response from the model, trying again...
24.04.21 14:48:15: root: INFO : SOCKET tokens MESSAGE: {'token_usage': 14209}
Model: llama3:latest, Enum: OLLAMA
24.04.21 14:48:19: root: INFO : SOCKET tokens MESSAGE: {'token_usage': 13453}
Invalid response from the model, trying again...
24.04.21 14:48:19: root: INFO : SOCKET tokens MESSAGE: {'token_usage': 15343}
Model: llama3:latest, Enum: OLLAMA
24.04.21 14:48:28: root: INFO : SOCKET tokens MESSAGE: {'token_usage': 15009}
Invalid response from the model, trying again...
24.04.21 14:48:28: root: INFO : SOCKET tokens MESSAGE: {'token_usage': 16688}
Model: llama3:latest, Enum: OLLAMA
24.04.21 14:48:38: root: INFO : SOCKET tokens MESSAGE: {'token_usage': 16488}
Invalid response from the model, trying again...
24.04.21 14:48:38: root: INFO : SOCKET tokens MESSAGE: {'token_usage': 18100}
Model: llama3:latest, Enum: OLLAMA
24.04.21 14:48:51: root: INFO : SOCKET tokens MESSAGE: {'token_usage': 18120}

@Omarsmsm
Copy link

same issue

@jonatso
Copy link

jonatso commented Apr 23, 2024

me too

@slightlyarrogant
Copy link

Same issue, running in Linux mint with groq (all available LLM), ollama (llama3, llama3:instruct, mixtral).
gpt4 turbo works well.

ARajgor added a commit that referenced this issue May 2, 2024
* chore: minor updates

* Add: send live inference time to frontend

* add: timeout in settings

* Improve: response parsing, add temperature to models

* patches

close #510, #507, #502, #468
@ARajgor ARajgor closed this as completed May 2, 2024
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

5 participants