Skip to content

Local Planner request an API error #95

Description

@Mikael17125
(computer_use_ootb) C:\Users\Mikael\Documents\GitHub\computer_use_ootb>python app.py
[INFO] computer_use_demo.tools.logger - Starting the gradio app
[INFO] computer_use_demo.tools.logger - Found 2 screens
[INFO] computer_use_demo.tools.logger - loaded initial api_key for openai: 
[WARNING] computer_use_demo.tools.logger - Planner API key not found. Please set it in the environment or paste in textbox.
C:\Users\Mikael\Documents\GitHub\computer_use_ootb\app.py:602: UserWarning: The 'tuples' format for chatbot messages is deprecated and will be removed in a future version of Gradio. Please set type='messages' instead, which uses openai-style 'role' and 'content' keys.
  chatbot = gr.Chatbot(label="Chatbot History", type="tuples", autoscroll=True, height=580, group_consecutive_messages=False)
* Running on local URL:  http://127.0.0.1:7888
* To create a public link, set `share=True` in `launch()`.
[INFO] computer_use_demo.tools.logger - Model updated to: qwen2-vl-2b (local)
[INFO] computer_use_demo.tools.logger - Updated state: model=qwen2-vl-2b (local), provider=local, api_key=
[INFO] computer_use_demo.tools.logger - loaded initial api_key for openai: 
[WARNING] computer_use_demo.tools.logger - Planner API key not found. Please set it in the environment or paste in textbox.
[INFO] computer_use_demo.tools.logger - Planner model qwen2-vl-2b-instruct inited on device: cuda.
Traceback (most recent call last):
  File "C:\Users\Mikael\anaconda3\envs\computer_use_ootb\Lib\site-packages\gradio\queueing.py", line 715, in process_events
    response = await route_utils.call_process_api(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Mikael\anaconda3\envs\computer_use_ootb\Lib\site-packages\gradio\route_utils.py", line 322, in call_process_api
    output = await app.get_blocks().process_api(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Mikael\anaconda3\envs\computer_use_ootb\Lib\site-packages\gradio\blocks.py", line 2146, in process_api
    result = await self.call_function(
             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Mikael\anaconda3\envs\computer_use_ootb\Lib\site-packages\gradio\blocks.py", line 1676, in call_function
    prediction = await utils.async_iteration(iterator)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Mikael\anaconda3\envs\computer_use_ootb\Lib\site-packages\gradio\utils.py", line 729, in async_iteration
    return await anext(iterator)
           ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Mikael\anaconda3\envs\computer_use_ootb\Lib\site-packages\gradio\utils.py", line 723, in __anext__
    return await anyio.to_thread.run_sync(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Mikael\anaconda3\envs\computer_use_ootb\Lib\site-packages\anyio\to_thread.py", line 56, in run_sync
    return await get_async_backend().run_sync_in_worker_thread(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Mikael\anaconda3\envs\computer_use_ootb\Lib\site-packages\anyio\_backends\_asyncio.py", line 2470, in run_sync_in_worker_thread
    return await future
           ^^^^^^^^^^^^
  File "C:\Users\Mikael\anaconda3\envs\computer_use_ootb\Lib\site-packages\anyio\_backends\_asyncio.py", line 967, in run
    result = context.run(func, *args)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Mikael\anaconda3\envs\computer_use_ootb\Lib\site-packages\gradio\utils.py", line 706, in run_sync_iterator_async
    return next(iterator)
           ^^^^^^^^^^^^^^
  File "C:\Users\Mikael\anaconda3\envs\computer_use_ootb\Lib\site-packages\gradio\utils.py", line 867, in gen_wrapper
    response = next(iterator)
               ^^^^^^^^^^^^^^
  File "C:\Users\Mikael\Documents\GitHub\computer_use_ootb\app.py", line 221, in process_input
    for loop_msg in sampling_loop_sync(
                    ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Mikael\Documents\GitHub\computer_use_ootb\computer_use_demo\loop.py", line 133, in sampling_loop_sync
    planner = LocalVLMPlanner(
              ^^^^^^^^^^^^^^^^
TypeError: LocalVLMPlanner.__init__() got an unexpected keyword argument 'api_key'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions