cua-agent 0.4.0b1__tar.gz → 0.4.0b3__tar.gz

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.

Files changed (29) hide show
  1. {cua_agent-0.4.0b1 → cua_agent-0.4.0b3}/PKG-INFO +1 -1
  2. {cua_agent-0.4.0b1 → cua_agent-0.4.0b3}/agent/__init__.py +1 -1
  3. {cua_agent-0.4.0b1 → cua_agent-0.4.0b3}/agent/adapters/huggingfacelocal_adapter.py +16 -3
  4. {cua_agent-0.4.0b1 → cua_agent-0.4.0b3}/agent/loops/omniparser.py +1 -1
  5. {cua_agent-0.4.0b1 → cua_agent-0.4.0b3}/pyproject.toml +1 -1
  6. {cua_agent-0.4.0b1 → cua_agent-0.4.0b3}/README.md +0 -0
  7. {cua_agent-0.4.0b1 → cua_agent-0.4.0b3}/agent/__main__.py +0 -0
  8. {cua_agent-0.4.0b1 → cua_agent-0.4.0b3}/agent/adapters/__init__.py +0 -0
  9. {cua_agent-0.4.0b1 → cua_agent-0.4.0b3}/agent/agent.py +0 -0
  10. {cua_agent-0.4.0b1 → cua_agent-0.4.0b3}/agent/callbacks/__init__.py +0 -0
  11. {cua_agent-0.4.0b1 → cua_agent-0.4.0b3}/agent/callbacks/base.py +0 -0
  12. {cua_agent-0.4.0b1 → cua_agent-0.4.0b3}/agent/callbacks/budget_manager.py +0 -0
  13. {cua_agent-0.4.0b1 → cua_agent-0.4.0b3}/agent/callbacks/image_retention.py +0 -0
  14. {cua_agent-0.4.0b1 → cua_agent-0.4.0b3}/agent/callbacks/logging.py +0 -0
  15. {cua_agent-0.4.0b1 → cua_agent-0.4.0b3}/agent/callbacks/pii_anonymization.py +0 -0
  16. {cua_agent-0.4.0b1 → cua_agent-0.4.0b3}/agent/callbacks/trajectory_saver.py +0 -0
  17. {cua_agent-0.4.0b1 → cua_agent-0.4.0b3}/agent/cli.py +0 -0
  18. {cua_agent-0.4.0b1 → cua_agent-0.4.0b3}/agent/computer_handler.py +0 -0
  19. {cua_agent-0.4.0b1 → cua_agent-0.4.0b3}/agent/decorators.py +0 -0
  20. {cua_agent-0.4.0b1 → cua_agent-0.4.0b3}/agent/loops/__init__.py +0 -0
  21. {cua_agent-0.4.0b1 → cua_agent-0.4.0b3}/agent/loops/anthropic.py +0 -0
  22. {cua_agent-0.4.0b1 → cua_agent-0.4.0b3}/agent/loops/openai.py +0 -0
  23. {cua_agent-0.4.0b1 → cua_agent-0.4.0b3}/agent/loops/uitars.py +0 -0
  24. {cua_agent-0.4.0b1 → cua_agent-0.4.0b3}/agent/responses.py +0 -0
  25. {cua_agent-0.4.0b1 → cua_agent-0.4.0b3}/agent/types.py +0 -0
  26. {cua_agent-0.4.0b1 → cua_agent-0.4.0b3}/agent/ui/__init__.py +0 -0
  27. {cua_agent-0.4.0b1 → cua_agent-0.4.0b3}/agent/ui/gradio/__init__.py +0 -0
  28. {cua_agent-0.4.0b1 → cua_agent-0.4.0b3}/agent/ui/gradio/app.py +0 -0
  29. {cua_agent-0.4.0b1 → cua_agent-0.4.0b3}/agent/ui/gradio/ui_components.py +0 -0
@@ -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
@@ -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')
@@ -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()
@@ -6,7 +6,7 @@ build-backend = "pdm.backend"
6
6
 
7
7
  [project]
8
8
  name = "cua-agent"
9
- version = "0.4.0b1"
9
+ version = "0.4.0b3"
10
10
  description = "CUA (Computer Use) Agent for AI-driven computer interaction"
11
11
  readme = "README.md"
12
12
  authors = [
File without changes
File without changes
File without changes
File without changes