This commit is contained in:
Dillon DuPont
2025-07-27 15:20:24 -04:00
parent 6f177d7f6a
commit 0971464c8d
3 changed files with 18 additions and 5 deletions

View File

@@ -16,4 +16,4 @@ __all__ = [
"AgentResponse"
]
__version__ = "0.1.0"
__version__ = "0.4.0b2"

View File

@@ -1,10 +1,17 @@
import asyncio
import warnings
from typing import Iterator, AsyncIterator, Dict, List, Any, Optional
import torch
from transformers import Qwen2_5_VLForConditionalGeneration, AutoProcessor
from litellm.types.utils import GenericStreamingChunk, ModelResponse
from litellm import CustomLLM, completion, acompletion
from litellm.llms.custom_llm import CustomLLM
from litellm import completion, acompletion
# Try to import HuggingFace dependencies
try:
import torch
from transformers import Qwen2_5_VLForConditionalGeneration, AutoProcessor
HF_AVAILABLE = True
except ImportError:
HF_AVAILABLE = False
class HuggingFaceLocalAdapter(CustomLLM):
@@ -102,6 +109,12 @@ class HuggingFaceLocalAdapter(CustomLLM):
Returns:
Generated text response
"""
if not HF_AVAILABLE:
raise ImportError(
"HuggingFace transformers dependencies not found. "
"Please install with: pip install \"cua-agent[uitars-hf]\""
)
# Extract messages and model from kwargs
messages = kwargs.get('messages', [])
model_name = kwargs.get('model', 'ByteDance-Seed/UI-TARS-1.5-7B')

View File

@@ -4,7 +4,7 @@ build-backend = "pdm.backend"
[project]
name = "cua-agent"
version = "0.4.0b1"
version = "0.4.0b2"
description = "CUA (Computer Use) Agent for AI-driven computer interaction"
readme = "README.md"
authors = [