Open Raintimewang opened 1 month ago
Tried py3.11 and installed [local], but it didn't improve this issue.
litellm.exceptions.BadRequestError: BadRequestError: OpenAIException - Failed to deserialize the JSON body into
the target type: messages[8].role: unknown variant computer
, expected one of system
, user
, assistant
,
tool
at line 1 column 7252
Viewing image...
To use local vision, run pip install 'open-interpreter[local]'
.
To use local vision, run pip install 'open-interpreter[local]'
.
Traceback (most recent call last): File "C:\ProgramData\anaconda3\envs\oi\Lib\site-packages\litellm\llms\openai.py", line 736, in completion raise e File "C:\ProgramData\anaconda3\envs\oi\Lib\site-packages\litellm\llms\openai.py", line 655, in completion return self.streaming( ^^^^^^^^^^^^^^^ File "C:\ProgramData\anaconda3\envs\oi\Lib\site-packages\litellm\llms\openai.py", line 833, in streaming response = openai_client.chat.completions.create(*data, timeout=timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ProgramData\anaconda3\envs\oi\Lib\site-packages\openai_utils_utils.py", line 277, in wrapper return func(args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "C:\ProgramData\anaconda3\envs\oi\Lib\site-packages\openai\resources\chat\completions.py", line 646, in create return self._post( ^^^^^^^^^^^ File "C:\ProgramData\anaconda3\envs\oi\Lib\site-packages\openai_base_client.py", line 1266, in post return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ProgramData\anaconda3\envs\oi\Lib\site-packages\openai_base_client.py", line 942, in request return self._request( ^^^^^^^^^^^^^^ File "C:\ProgramData\anaconda3\envs\oi\Lib\site-packages\openai_base_client.py", line 1046, in _request raise self._make_status_error_from_response(err.response) from None openai.AuthenticationError: Authentication Fails (no such user)
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\ProgramData\anaconda3\envs\oi\Lib\site-packages\litellm\main.py", line 1112, in completion raise e File "C:\ProgramData\anaconda3\envs\oi\Lib\site-packages\litellm\main.py", line 1085, in completion response = openai_chat_completions.completion( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ProgramData\anaconda3\envs\oi\Lib\site-packages\litellm\llms\openai.py", line 742, in completion raise OpenAIError(status_code=e.status_code, message=str(e)) litellm.llms.openai.OpenAIError: Authentication Fails (no such user)
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\ProgramData\anaconda3\envs\oi\Lib\site-packages\interpreter\core\llm\llm.py", line 386, in fixed_litellm_completions yield from litellm.completion(*params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ProgramData\anaconda3\envs\oi\Lib\site-packages\litellm\utils.py", line 3472, in wrapper raise e File "C:\ProgramData\anaconda3\envs\oi\Lib\site-packages\litellm\utils.py", line 3363, in wrapper result = original_function(args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ProgramData\anaconda3\envs\oi\Lib\site-packages\litellm\main.py", line 2480, in completion raise exception_type( ^^^^^^^^^^^^^^^ File "C:\ProgramData\anaconda3\envs\oi\Lib\site-packages\litellm\utils.py", line 9927, in exception_type raise e File "C:\ProgramData\anaconda3\envs\oi\Lib\site-packages\litellm\utils.py", line 8500, in exception_type raise AuthenticationError( litellm.exceptions.AuthenticationError: AuthenticationError: OpenAIException - Authentication Fails (no such user)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "computer
, expected one of system
, user
, assistant
,
tool
at line 1 column 7252
Tested it, V0.2.6 still works fine, although it cannot call the album program to display images.
Describe the bug
Plan:
1 Import necessary libraries in Python. 2 Generate x values. 3 Calculate corresponding y values using the sin function. 4 Plot the graph.
import numpy as np import matplotlib.pyplot as plt
x = np.linspace(0, 2*np.pi, 1000) y = np.sin(x)
plt.plot(x, y) plt.xlabel('x') plt.ylabel('sin(x)') plt.title('Sine Function') plt.show()
Viewing image...
To use local vision, run
pip install 'open-interpreter[local]'
.To use local vision, run
pip install 'open-interpreter[local]'
.Traceback (most recent call last): File "D:\Anaconda\Lib\site-packages\litellm\llms\openai.py", line 736, in completion raise e File "D:\Anaconda\Lib\site-packages\litellm\llms\openai.py", line 655, in completion return self.streaming( ^^^^^^^^^^^^^^^ File "D:\Anaconda\Lib\site-packages\litellm\llms\openai.py", line 833, in streaming response = openai_client.chat.completions.create(*data, timeout=timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Anaconda\Lib\site-packages\openai_utils_utils.py", line 277, in wrapper return func(args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "D:\Anaconda\Lib\site-packages\openai\resources\chat\completions.py", line 646, in create return self._post( ^^^^^^^^^^^ File "D:\Anaconda\Lib\site-packages\openai_base_client.py", line 1266, in post return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Anaconda\Lib\site-packages\openai_base_client.py", line 942, in request return self._request( ^^^^^^^^^^^^^^ File "D:\Anaconda\Lib\site-packages\openai_base_client.py", line 1046, in _request raise self._make_status_error_from_response(err.response) from None openai.AuthenticationError: Error code: 401 - {'error': {'code': 'AuthenticationError', 'message': 'The API key or AK/SK in the request is missing or invalid. requestId: XXXXX', 'param': '', 'type': 'Unauthorized'}}
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "D:\Anaconda\Lib\site-packages\litellm\main.py", line 1112, in completion raise e File "D:\Anaconda\Lib\site-packages\litellm\main.py", line 1085, in completion response = openai_chat_completions.completion( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Anaconda\Lib\site-packages\litellm\llms\openai.py", line 742, in completion raise OpenAIError(status_code=e.status_code, message=str(e)) litellm.llms.openai.OpenAIError: Error code: 401 - {'error': {'code': 'AuthenticationError', 'message': 'The API key or AK/SK in the request is missing or invalid. requestId: XXXXX', 'param': '', 'type': 'Unauthorized'}}
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "D:\Anaconda\Lib\site-packages\interpreter\core\llm\llm.py", line 386, in fixed_litellm_completions yield from litellm.completion(*params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Anaconda\Lib\site-packages\litellm\utils.py", line 3472, in wrapper raise e File "D:\Anaconda\Lib\site-packages\litellm\utils.py", line 3363, in wrapper result = original_function(args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Anaconda\Lib\site-packages\litellm\main.py", line 2480, in completion raise exception_type( ^^^^^^^^^^^^^^^ File "D:\Anaconda\Lib\site-packages\litellm\utils.py", line 9927, in exception_type raise e File "D:\Anaconda\Lib\site-packages\litellm\utils.py", line 8500, in exception_type raise AuthenticationError( litellm.exceptions.AuthenticationError: AuthenticationError: OpenAIException - Error code: 401 - {'error': {'code': 'AuthenticationError', 'message': 'The API key or AK/SK in the request is missing or invalid. requestId: 021722153547363bc6ef51f61ecfafe48ca0f0d9537b76766796a', 'param': '', 'type': 'Unauthorized'}}
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "D:\Anaconda\Scripts\interpreter.exe__main__.py", line 7, in
File "D:\Anaconda\Lib\site-packages\interpreter\terminal_interface\start_terminal_interface.py", line 525, in main
start_terminal_interface(interpreter)
File "D:\Anaconda\Lib\site-packages\interpreter\terminal_interface\start_terminal_interface.py", line 491, in
start_terminalinterface
interpreter.chat()
File "D:\Anaconda\Lib\site-packages\interpreter\core\core.py", line 188, in chat
for in self._streaming_chat(message=message, display=display):
File "D:\Anaconda\Lib\site-packages\interpreter\core\core.py", line 220, in _streaming_chat
yield from terminal_interface(self, message)
File "D:\Anaconda\Lib\site-packages\interpreter\terminal_interface\terminal_interface.py", line 140, in
terminal_interface
for chunk in interpreter.chat(message, display=False, stream=True):
File "D:\Anaconda\Lib\site-packages\interpreter\core\core.py", line 259, in _streaming_chat
yield from self._respond_and_store()
File "D:\Anaconda\Lib\site-packages\interpreter\core\core.py", line 310, in _respond_and_store
for chunk in respond(self):
File "D:\Anaconda\Lib\site-packages\interpreter\core\respond.py", line 79, in respond
for chunk in interpreter.llm.run(messages_for_llm):
File "D:\Anaconda\Lib\site-packages\interpreter\core\llm\llm.py", line 277, in run
yield from run_text_llm(self, params)
File "D:\Anaconda\Lib\site-packages\interpreter\core\llm\run_text_llm.py", line 20, in run_text_llm
for chunk in llm.completions(params):
File "D:\Anaconda\Lib\site-packages\interpreter\core\llm\llm.py", line 389, in fixed_litellm_completions
raise first_error
File "D:\Anaconda\Lib\site-packages\interpreter\core\llm\llm.py", line 370, in fixed_litellm_completions
yield from litellm.completion(params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Anaconda\Lib\site-packages\litellm\utils.py", line 3472, in wrapper
raise e
File "D:\Anaconda\Lib\site-packages\litellm\utils.py", line 3363, in wrapper
result = original_function(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Anaconda\Lib\site-packages\litellm\main.py", line 2480, in completion
raise exception_type(
^^^^^^^^^^^^^^^
File "D:\Anaconda\Lib\site-packages\litellm\utils.py", line 9927, in exception_type
raise e
File "D:\Anaconda\Lib\site-packages\litellm\utils.py", line 8491, in exception_type
raise BadRequestError(
litellm.exceptions.BadRequestError: OpenAIException - Error code: 400 - {'error': {'code': 'InvalidParameter',
'message': 'One or more parameters specified in the request are not valid. Request id:
XXXXX', 'param': 'messages.role', 'type': 'BadRequest'}}
Reproduce
Draw a sine function
Expected behavior
Continue the conversation instead of exiting
Screenshots
Open Interpreter version
0.3.4
Python version
3.12.4
Operating System name and version
win11
Additional context
No response