cua-agent 0.4.0b1__tar.gz → 0.4.0b2__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.
- {cua_agent-0.4.0b1 → cua_agent-0.4.0b2}/PKG-INFO +1 -1
- {cua_agent-0.4.0b1 → cua_agent-0.4.0b2}/agent/__init__.py +1 -1
- {cua_agent-0.4.0b1 → cua_agent-0.4.0b2}/agent/adapters/huggingfacelocal_adapter.py +16 -3
- {cua_agent-0.4.0b1 → cua_agent-0.4.0b2}/pyproject.toml +1 -1
- {cua_agent-0.4.0b1 → cua_agent-0.4.0b2}/README.md +0 -0
- {cua_agent-0.4.0b1 → cua_agent-0.4.0b2}/agent/__main__.py +0 -0
- {cua_agent-0.4.0b1 → cua_agent-0.4.0b2}/agent/adapters/__init__.py +0 -0
- {cua_agent-0.4.0b1 → cua_agent-0.4.0b2}/agent/agent.py +0 -0
- {cua_agent-0.4.0b1 → cua_agent-0.4.0b2}/agent/callbacks/__init__.py +0 -0
- {cua_agent-0.4.0b1 → cua_agent-0.4.0b2}/agent/callbacks/base.py +0 -0
- {cua_agent-0.4.0b1 → cua_agent-0.4.0b2}/agent/callbacks/budget_manager.py +0 -0
- {cua_agent-0.4.0b1 → cua_agent-0.4.0b2}/agent/callbacks/image_retention.py +0 -0
- {cua_agent-0.4.0b1 → cua_agent-0.4.0b2}/agent/callbacks/logging.py +0 -0
- {cua_agent-0.4.0b1 → cua_agent-0.4.0b2}/agent/callbacks/pii_anonymization.py +0 -0
- {cua_agent-0.4.0b1 → cua_agent-0.4.0b2}/agent/callbacks/trajectory_saver.py +0 -0
- {cua_agent-0.4.0b1 → cua_agent-0.4.0b2}/agent/cli.py +0 -0
- {cua_agent-0.4.0b1 → cua_agent-0.4.0b2}/agent/computer_handler.py +0 -0
- {cua_agent-0.4.0b1 → cua_agent-0.4.0b2}/agent/decorators.py +0 -0
- {cua_agent-0.4.0b1 → cua_agent-0.4.0b2}/agent/loops/__init__.py +0 -0
- {cua_agent-0.4.0b1 → cua_agent-0.4.0b2}/agent/loops/anthropic.py +0 -0
- {cua_agent-0.4.0b1 → cua_agent-0.4.0b2}/agent/loops/omniparser.py +0 -0
- {cua_agent-0.4.0b1 → cua_agent-0.4.0b2}/agent/loops/openai.py +0 -0
- {cua_agent-0.4.0b1 → cua_agent-0.4.0b2}/agent/loops/uitars.py +0 -0
- {cua_agent-0.4.0b1 → cua_agent-0.4.0b2}/agent/responses.py +0 -0
- {cua_agent-0.4.0b1 → cua_agent-0.4.0b2}/agent/types.py +0 -0
- {cua_agent-0.4.0b1 → cua_agent-0.4.0b2}/agent/ui/__init__.py +0 -0
- {cua_agent-0.4.0b1 → cua_agent-0.4.0b2}/agent/ui/gradio/__init__.py +0 -0
- {cua_agent-0.4.0b1 → cua_agent-0.4.0b2}/agent/ui/gradio/app.py +0 -0
- {cua_agent-0.4.0b1 → cua_agent-0.4.0b2}/agent/ui/gradio/ui_components.py +0 -0
|
@@ -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
|
|
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')
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|