anthropics / anthropic-quickstarts

A collection of projects designed to help developers quickly get started with building deployable applications using the Anthropic API
MIT License
6.44k stars 865 forks source link

Safety error #74

Open dctmfoo opened 1 week ago

dctmfoo commented 1 week ago

No matter the prompt and in both windows and linux environments, I get this error a min after prompting it.

➡️ Open http://localhost:8080 in your browser to begin 2024-10-23 08:17:13.523 Uncaught app exception Traceback (most recent call last): File "/home/computeruse/.pyenv/versions/3.11.6/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/exec_code.py", line 88, in exec_func_with_error_handling result = func() ^^^^^^ File "/home/computeruse/.pyenv/versions/3.11.6/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 579, in code_to_exec exec(code, module.dict) File "/home/computeruse/computer_use_demo/streamlit.py", line 357, in asyncio.run(main()) File "/home/computeruse/.pyenv/versions/3.11.6/lib/python3.11/asyncio/runners.py", line 190, in run return runner.run(main) ^^^^^^^^^^^^^^^^ File "/home/computeruse/.pyenv/versions/3.11.6/lib/python3.11/asyncio/runners.py", line 118, in run return self._loop.run_until_complete(task) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/computeruse/.pyenv/versions/3.11.6/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "/home/computeruse/computer_use_demo/streamlit.py", line 213, in main st.session_state.messages = await sampling_loop( ^^^^^^^^^^^^^^^^^^^^ File "/home/computeruse/computer_use_demo/loop.py", line 105, in sampling_loop raw_response = client.beta.messages.with_raw_response.create( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/computeruse/.pyenv/versions/3.11.6/lib/python3.11/site-packages/anthropic/_legacy_response.py", line 377, in wrapped return cast(LegacyAPIResponse[R], func(*args, *kwargs)) ^^^^^^^^^^^^^^^^^^^^^ File "/home/computeruse/.pyenv/versions/3.11.6/lib/python3.11/site-packages/anthropic/_utils/_utils.py", line 274, in wrapper return func(args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/home/computeruse/.pyenv/versions/3.11.6/lib/python3.11/site-packages/anthropic/resources/beta/messages/messages.py", line 896, in create return self._post( ^^^^^^^^^^^ File "/home/computeruse/.pyenv/versions/3.11.6/lib/python3.11/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 "/home/computeruse/.pyenv/versions/3.11.6/lib/python3.11/site-packages/anthropic/_base_client.py", line 954, in request return self._request( ^^^^^^^^^^^^^^ File "/home/computeruse/.pyenv/versions/3.11.6/lib/python3.11/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': 'This action is temporarily not available at this time due to enhanced protections for the beta release.'}}

Here are some of the actions done by computer-use before it threw the above error

image

dctmfoo commented 1 week ago

So far tried deleting the image and pulling again but no luck!

dctmfoo commented 1 week ago

Strange that I get the exact error even after building docker image using the below instructions from Readme

./setup.sh # configure venv, install development dependencies, and install pre-commit hooks docker build . -t computer-use-demo:local # manually build the docker image (optional) export ANTHROPIC_API_KEY=%your_api_key% docker run \ -e ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY \ -v $(pwd)/computer_use_demo:/home/computeruse/computer_use_demo/ # mount local python module for development \ -v $HOME/.anthropic:/home/computeruse/.anthropic \ -p 5900:5900 \ -p 8501:8501 \ -p 6080:6080 \ -p 8080:8080 \ -it computer-use-demo:local # can also use ghcr.io/anthropics/anthropic-quickstarts:computer-use-demo-latest

takielias commented 1 week ago

Same here

scamurcuoglu commented 1 week ago

Same here as well, using the README development example on Linux. For me it happens after executing a few steps of the task I requested on the web page

chrisgorgo commented 1 week ago

The error This action is temporarily not available at this time due to enhanced protections for the beta release. is unrelated to the OS or environment. This is one of our safety interventions. Would you mind sharing what prompts and screenshots triggered it?

scamurcuoglu commented 1 week ago

For me the prompts that cause it are some variations of

"Go to gurulia.com, find mark dawson's profile and click on it to go to his profile page"

chrisgorgo commented 1 week ago

thanks - I was able to replicate