cua-agent 0.4.0b1__py3-none-any.whl → 0.4.0b3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of cua-agent might be problematic. Click here for more details.

agent/__init__.py CHANGED
@@ -16,4 +16,4 @@ __all__ = [
16
16
  "AgentResponse"
17
17
  ]
18
18
 
19
- __version__ = "0.4.0b1"
19
+ __version__ = "0.4.0b3"
@@ -1,10 +1,17 @@
1
1
  import asyncio
2
2
  import warnings
3
3
  from typing import Iterator, AsyncIterator, Dict, List, Any, Optional
4
- import torch
5
- from transformers import Qwen2_5_VLForConditionalGeneration, AutoProcessor
6
4
  from litellm.types.utils import GenericStreamingChunk, ModelResponse
7
- from litellm import CustomLLM, completion, acompletion
5
+ from litellm.llms.custom_llm import CustomLLM
6
+ from litellm import completion, acompletion
7
+
8
+ # Try to import HuggingFace dependencies
9
+ try:
10
+ import torch
11
+ from transformers import Qwen2_5_VLForConditionalGeneration, AutoProcessor
12
+ HF_AVAILABLE = True
13
+ except ImportError:
14
+ HF_AVAILABLE = False
8
15
 
9
16
 
10
17
  class HuggingFaceLocalAdapter(CustomLLM):
@@ -102,6 +109,12 @@ class HuggingFaceLocalAdapter(CustomLLM):
102
109
  Returns:
103
110
  Generated text response
104
111
  """
112
+ if not HF_AVAILABLE:
113
+ raise ImportError(
114
+ "HuggingFace transformers dependencies not found. "
115
+ "Please install with: pip install \"cua-agent[uitars-hf]\""
116
+ )
117
+
105
118
  # Extract messages and model from kwargs
106
119
  messages = kwargs.get('messages', [])
107
120
  model_name = kwargs.get('model', 'ByteDance-Seed/UI-TARS-1.5-7B')
agent/loops/omniparser.py CHANGED
@@ -84,7 +84,7 @@ except ImportError:
84
84
  pass
85
85
  OMNIPARSER_SINGLETON = None
86
86
 
87
- def get_parser() -> OmniParser:
87
+ def get_parser():
88
88
  global OMNIPARSER_SINGLETON
89
89
  if OMNIPARSER_SINGLETON is None:
90
90
  OMNIPARSER_SINGLETON = OmniParser()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cua-agent
3
- Version: 0.4.0b1
3
+ Version: 0.4.0b3
4
4
  Summary: CUA (Computer Use) Agent for AI-driven computer interaction
5
5
  Author-Email: TryCua <gh@trycua.com>
6
6
  Requires-Python: >=3.11
@@ -1,7 +1,7 @@
1
- agent/__init__.py,sha256=uGYkMXYdujuYoSDdH-OLEIj5uP1oXhASE6M_sMplSV0,356
1
+ agent/__init__.py,sha256=aRumS6zu5IoVToS-fasvIJ7msjE-gufNsMUY-LPAf0Q,356
2
2
  agent/__main__.py,sha256=lBUe8Niqa5XoCjwFfXyX7GtnUwjjZXC1-j4V9mvUYSc,538
3
3
  agent/adapters/__init__.py,sha256=szM2HMten2WkcqXeRnan__-sXjpyS4eyvIW0LXSfj4U,178
4
- agent/adapters/huggingfacelocal_adapter.py,sha256=C8Z9ecRJhNasFFCqYfPKleZtJI4gE_C0jm6I_AwJ37Q,7652
4
+ agent/adapters/huggingfacelocal_adapter.py,sha256=dnzzxYCvFiuDdNzsb_1uM-boWv1eS__dWMve_fAnlUc,8038
5
5
  agent/agent.py,sha256=tXVnqzwC721UUN57OWEatfoZXFAzaDfrZ0G-EuVK3Ug,24022
6
6
  agent/callbacks/__init__.py,sha256=SO9NKTrmk4sZ7ZwvWFhTtK9co1FgwubUe3bwkIXYwn0,472
7
7
  agent/callbacks/base.py,sha256=UnnnYlh6XCm6HKZZsAPaT_Eyo9LUYLyjyNwF-QRm6Ns,4691
@@ -15,7 +15,7 @@ agent/computer_handler.py,sha256=2gfFBeDk9Vd54x9mOqnswMo8BdjUduLo5I0RbBPLovY,396
15
15
  agent/decorators.py,sha256=bCmcCjP31WEjWg1D91OE2jo7AZTfGa9cNgCnYUvjiyw,2832
16
16
  agent/loops/__init__.py,sha256=_qpP_--3ePdFkTZP8qmUEFlBsy6m4h8fj0gGLDKA7zw,217
17
17
  agent/loops/anthropic.py,sha256=w5s_zvkXdcHt0DgBMYjDQGDMBXK4bPu-SyeIMhA1Rrs,32243
18
- agent/loops/omniparser.py,sha256=qfQk9GsuSd4MAJL7mRSWv_fZBOn2dfp3HMhDuMGHKxk,11436
18
+ agent/loops/omniparser.py,sha256=m3bDNQ0Igc_HHVoAbjVNj599uRoC9Eap3DCALg6RZ54,11422
19
19
  agent/loops/openai.py,sha256=ArTqadeJY8F9N8ZLKfswlzgHV_54HbWJgLd4l6ele9w,3010
20
20
  agent/loops/uitars.py,sha256=L0NYxKoIiMfIHbyomnaiK3ZGLmLv3QMx9nX57GruAk0,26323
21
21
  agent/responses.py,sha256=8vnCqi21x3gzo59yDmcsA_E_-CyYxIuCwgfQF0PIomg,6867
@@ -24,7 +24,7 @@ agent/ui/__init__.py,sha256=o7NIpZGFiCTUhgj6eB7gWRRpVhrUAsrOdWnPgbfDgVM,124
24
24
  agent/ui/gradio/__init__.py,sha256=j3dc1i14daVIDEo-3K1w_v5EyDsHeB3TdgKkuteDivM,143
25
25
  agent/ui/gradio/app.py,sha256=9i4YzLZRkvPrYKnrl6eDx1mR2QaSSsWgG-YQVlhedX8,8788
26
26
  agent/ui/gradio/ui_components.py,sha256=IZsYOwn3dwQN8E5-3cFVlLhGlu77I35YhdPY8QxB0Uk,33513
27
- cua_agent-0.4.0b1.dist-info/METADATA,sha256=YidBvaV6v4NFZr5qWafwNQ0HK6X5oD59p2wR2mZFJHQ,12062
28
- cua_agent-0.4.0b1.dist-info/WHEEL,sha256=9P2ygRxDrTJz3gsagc0Z96ukrxjr-LFBGOgv3AuKlCA,90
29
- cua_agent-0.4.0b1.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
30
- cua_agent-0.4.0b1.dist-info/RECORD,,
27
+ cua_agent-0.4.0b3.dist-info/METADATA,sha256=muJBA7zaMJGzGOC2t8drwiOCRsvNO1BXw8pUvQFaj6w,12062
28
+ cua_agent-0.4.0b3.dist-info/WHEEL,sha256=9P2ygRxDrTJz3gsagc0Z96ukrxjr-LFBGOgv3AuKlCA,90
29
+ cua_agent-0.4.0b3.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
30
+ cua_agent-0.4.0b3.dist-info/RECORD,,