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

anthropic.BadRequestError #1509

Open
austinmw opened this issue Oct 29, 2024 · 1 comment
Open

anthropic.BadRequestError #1509

austinmw opened this issue Oct 29, 2024 · 1 comment
Labels
Bug Something isn't working

Comments

@austinmw
Copy link

Describe the bug

interpreter --os screenshots are too large without resizing

{"action": "screenshot"}Traceback (most recent call last):
  File "/Users/austinwelch/mambaforge/envs/py312/bin/interpreter", line 5, in <module>
    from interpreter.terminal_interface.start_terminal_interface import main
  File "/Users/austinwelch/mambaforge/envs/py312/lib/python3.12/site-packages/interpreter/__init__.py", line 54, in <module>
    run_async_main()
  File "/Users/austinwelch/mambaforge/envs/py312/lib/python3.12/site-packages/interpreter/computer_use/loop.py", line 528, in run_async_main
    asyncio.run(main())
  File "/Users/austinwelch/mambaforge/envs/py312/lib/python3.12/asyncio/runners.py", line 194, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/Users/austinwelch/mambaforge/envs/py312/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/austinwelch/mambaforge/envs/py312/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/Users/austinwelch/mambaforge/envs/py312/lib/python3.12/site-packages/interpreter/computer_use/loop.py", line 505, in main
    async for chunk in sampling_loop(
  File "/Users/austinwelch/mambaforge/envs/py312/lib/python3.12/site-packages/interpreter/computer_use/loop.py", line 152, in sampling_loop
    raw_response = client.beta.messages.create(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/austinwelch/mambaforge/envs/py312/lib/python3.12/site-packages/anthropic/_utils/_utils.py", line 274, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/austinwelch/mambaforge/envs/py312/lib/python3.12/site-packages/anthropic/resources/beta/messages/messages.py", line 896, in create
    return self._post(
           ^^^^^^^^^^^
  File "/Users/austinwelch/mambaforge/envs/py312/lib/python3.12/site-packages/anthropic/_base_client.py", line 1277, in post
    return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/austinwelch/mambaforge/envs/py312/lib/python3.12/site-packages/anthropic/_base_client.py", line 954, in request
    return self._request(
           ^^^^^^^^^^^^^^
  File "/Users/austinwelch/mambaforge/envs/py312/lib/python3.12/site-packages/anthropic/_base_client.py", line 1058, in _request
    raise self._make_status_error_from_response(err.response) from None
anthropic.BadRequestError: Error code: 400 - {'type': 'error', 'error': {'type': 'invalid_request_error', 'message': 'messages.2.content.0.tool_result.content.0.image.source.base64: image exceeds 5 MB maximum: 5626164 bytes > 5242880 bytes'}}

Reproduce

interpreter --os on large monitor

Expected behavior

No error

Screenshots

No response

Open Interpreter version

0.4.3

Python version

3.12

Operating System name and version

MacOS 15

Additional context

No response

@MikeBirdTech MikeBirdTech added the Bug Something isn't working label Nov 4, 2024
@MikeBirdTech
Copy link
Contributor

Need to figure out a way to limit the size of screenshots without impacting coordinate system

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants