anthropics / anthropic-quickstarts

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

Troubles of typing in computer using demo #71

Open liigoQi opened 1 month ago

liigoQi commented 1 month ago

I've found that sometimes the input that claude asks to be given to the tool and its behavior in the computer don't match, for example, when using the computer tool to perform a type action, claude gives the input text '万能青年旅店 2024 演出', but the actual action doesn't enter the words in full, resulting in not being able to query the needed information. This happens in several attempts.

Claude output:

Tool Use: computer
Input: {'action': 'type', 'text': '万能青年旅店 2024 演出'}

Typing in the computer: '旅 2024 出'

image

I would like to know what part of the program is causing this problem and can I fix it?

liigoQi commented 1 month ago

I've found that troubles do not happen when I use English!

Kris-CN commented 1 month ago

大佬,想请教下你那会出现类似下面的权限问题嘛,是必须要付费才能使用吗,我申请的是免费的API :( PermissionDeniedError: Error code: 403 - {'error': {'type': 'forbidden', 'message': 'Request not allowed'}} Traceback: 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

x5a commented 1 month ago

@Kris-CN please see: https://docs.anthropic.com/en/api/supported-regions

chrisgorgo commented 1 month ago

Hmm I am struggling to replicate image do you have any other examples?