devika icon indicating copy to clipboard operation
devika copied to clipboard

[ISSUE]SOCKET inference MESSAGE: {'type': 'error', 'message': "Error code: 401 - {'error': {'message': 'Incorrect API key provided: . You can find your API key at https://platform.openai.com/account/api-keys.', 'type': 'invalid_request_error', 'param': None, 'code': 'invalid_api_key'}}"}

Open jwillz7667 opened this issue 1 year ago • 2 comments

Screenshot 2024-04-29 at 9 25 51 AM

SOCKET inference MESSAGE: {'type': 'error', 'message': "Error code: 401 - {'error': {'message': 'Incorrect API key provided: . You can find your API key at https://platform.openai.com/account/api-keys.', 'type': 'invalid_request_error', 'param': None, 'code': 'invalid_api_key'}}"} ^^^getting this error and have checked and double checked the api key and keeps popping up

Describe your issue

A clear and concise description of what the issue is.

How To Reproduce

Steps to reproduce the behavior (example):

  1. {steps_1}
  2. {steps_2}
  3. {steps_3}

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots and logs

must share logs from frontend or backend. also If applicable, add screenshots to help explain your problem.

Configuration

- OS: [e.g. Windows, Linux, MacOS]
- Python version: [e.g. 3.10]
- Node version: [e.g. 18.0.0]
- bun version: [e.g. 0.1.0]
- search engine: [e.g. google]
- Model: [e.g. gpt, cluade]

Additional context

Add any other context about the problem here.

jwillz7667 avatar Apr 29 '24 14:04 jwillz7667

24.04.29 09:26:36: root: INFO : SOCKET socket_response MESSAGE: {'data': 'Server Connected'} 24.04.29 09:25:35: root: INFO : SOCKET inference MESSAGE: {'type': 'error', 'message': "Error code: 401 - {'error': {'message': 'Incorrect API key provided: . You can find your API key at https://platform.openai.com/account/api-keys.', 'type': 'invalid_request_error', 'param': None, 'code': 'invalid_api_key'}}"} 24.04.29 09:25:34: root: INFO : SOCKET inference MESSAGE: {'type': 'time', 'elapsed_time': '0.00'} 24.04.29 09:25:34: root: INFO : SOCKET tokens MESSAGE: {'token_usage': 1815} 24.04.29 09:25:34: root: INFO : SOCKET agent-state MESSAGE: [{'internal_monologue': "I'm starting the work...", 'browser_session': {'url': None, 'screenshot': None}, 'terminal_session': {'command': None, 'output': None, 'title': None}, 'step': 1, 'message': None, 'completed': False, 'agent_is_active': True, 'token_usage': 0, 'timestamp': '2024-04-29 09:25:34'}] 24.04.29 09:25:34: root: INFO : SOCKET server-message MESSAGE: {'messages': {'from_devika': False, 'message': 'hi', 'timestamp': '2024-04-29 09:25:34'}} 24.04.29 09:25:34: root: INFO : SOCKET info MESSAGE: {'type': 'warning', 'message': "previous agent doesn't completed it's task."} 24.04.29 09:24:02: root: INFO : SOCKET inference MESSAGE: {'type': 'error', 'message': "Error code: 401 - {'error': {'message': 'Invalid API Key', 'type': 'invalid_request_error', 'code': 'invalid_api_key'}}"} 24.04.29 09:24:01: root: INFO : SOCKET inference MESSAGE: {'type': 'time', 'elapsed_time': '0.01'} 24.04.29 09:24:01: root: INFO : SOCKET tokens MESSAGE: {'token_usage': 1452} 24.04.29 09:24:01: root: INFO : SOCKET agent-state MESSAGE: [{'internal_monologue': "I'm starting the work...", 'browser_session': {'url': None, 'screenshot': None}, 'terminal_session': {'command': None, 'output': None, 'title': None}, 'step': 1, 'message': None, 'completed': False, 'agent_is_active': True, 'token_usage': 0, 'timestamp': '2024-04-29 09:24:01'}] 24.04.29 09:24:01: root: INFO : SOCKET server-message MESSAGE: {'messages': {'from_devika': False, 'message': 'hi', 'timestamp': '2024-04-29 09:24:01'}} 24.04.29 09:24:01: root: INFO : SOCKET info MESSAGE: {'type': 'warning', 'message': "previous agent doesn't completed it's task."} 24.04.29 09:23:47: root: INFO : SOCKET socket_response MESSAGE: {'data': 'Server Connected'} 24.04.29 09:23:26: root: INFO : SOCKET inference MESSAGE: {'type': 'error', 'message': "Error code: 401 - {'error': {'message': 'Incorrect API key provided: . You can find your API key at https://platform.openai.com/account/api-keys.', 'type': 'invalid_request_error', 'param': None, 'code': 'invalid_api_key'}}"} 24.04.29 09:23:25: root: INFO : SOCKET inference MESSAGE: {'type': 'time', 'elapsed_time': '0.00'} 24.04.29 09:23:25: root: INFO : SOCKET tokens MESSAGE: {'token_usage': 1089} 24.04.29 09:23:25: root: INFO : SOCKET agent-state MESSAGE: [{'internal_monologue': "I'm starting the work...", 'browser_session': {'url': None, 'screenshot': None}, 'terminal_session': {'command': None, 'output': None, 'title': None}, 'step': 1, 'message': None, 'completed': False, 'agent_is_active': True, 'token_usage': 0, 'timestamp': '2024-04-29 09:23:25'}] 24.04.29 09:23:25: root: INFO : SOCKET server-message MESSAGE: {'messages': {'from_devika': False, 'message': 'hi', 'timestamp': '2024-04-29 09:23:25'}} 24.04.29 09:23:25: root: INFO : SOCKET info MESSAGE: {'type': 'warning', 'message': "previous agent doesn't completed it's task."} 24.04.29 09:23:15: root: INFO : SOCKET socket_response MESSAGE: {'data': 'Server Connected'} 24.04.29 09:23:07: root: INFO : SOCKET socket_response MESSAGE: {'data': 'Server Connected'} 24.04.29 09:18:07: root: INFO : SOCKET socket_response MESSAGE: {'data': 'Server Connected'} 24.04.29 09:17:47: root: INFO : SOCKET inference MESSAGE: {'type': 'error', 'message': "Error code: 401 - {'error': {'message': 'Incorrect API key provided: . You can find your API key at https://platform.openai.com/account/api-keys.', 'type': 'invalid_request_error', 'param': None, 'code': 'invalid_api_key'}}"} 24.04.29 09:17:46: root: INFO : SOCKET inference MESSAGE: {'type': 'time', 'elapsed_time': '0.00'} 24.04.29 09:17:46: root: INFO : SOCKET tokens MESSAGE: {'token_usage': 726} 24.04.29 09:17:46: root: INFO : SOCKET agent-state MESSAGE: [{'internal_monologue': "I'm starting the work...", 'browser_session': {'url': None, 'screenshot': None}, 'terminal_session': {'command': None, 'output': None, 'title': None}, 'step': 1, 'message': None, 'completed': False, 'agent_is_active': True, 'token_usage': 0, 'timestamp': '2024-04-29 09:17:46'}] 24.04.29 09:17:46: root: INFO : SOCKET server-message MESSAGE: {'messages': {'from_devika': False, 'message': 'hello', 'timestamp': '2024-04-29 09:17:46'}} 24.04.29 09:17:44: root: INFO : SOCKET socket_response MESSAGE: {'data': 'Server Connected'} 24.04.29 09:17:07: root: INFO : SOCKET socket_response MESSAGE: {'data': 'Server Connected'} 24.04.29 09:15:51: root: INFO : SOCKET socket_response MESSAGE: {'data': 'Server Connected'} 24.04.29 09:15:08: root: INFO : SOCKET socket_response MESSAGE: {'data': 'Server Connected'} 24.04.29 09:15:04: root: INFO : SOCKET socket_response MESSAGE: {'data': 'Server Connected'}

jwillz7667 avatar Apr 29 '24 14:04 jwillz7667

Screenshot 2024-04-29 at 9 33 36 AM

jwillz7667 avatar Apr 29 '24 14:04 jwillz7667

it should be OPENAI = "sk-....." remove < and >

ARajgor avatar Apr 30 '24 05:04 ARajgor