Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 22 additions & 22 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
# LLM Provider Configuration
# ===========================
# ══════════════════════════════════════════════════════════════
# REQUIRED: At least ONE LLM provider key
# ══════════════════════════════════════════════════════════════
OPENAI_API_KEY=sk-...
# ANTHROPIC_API_KEY=
# GEMINI_API_KEY=
# DEEPSEEK_API_KEY=

# Default provider to use (openai, anthropic, gemini)
DEFAULT_LLM_CLIENT=openai
# ══════════════════════════════════════════════════════════════
# REQUIRED for visual element detection (Agent.Find Visual Element)
# ══════════════════════════════════════════════════════════════
HUGGINGFACE_API_KEY=hf_...

# OpenAI Configuration
OPENAI_API_KEY=your_openai_api_key_here
DEFAULT_OPENAI_MODEL=gpt-4o-mini

# Anthropic Configuration
ANTHROPIC_API_KEY=your_anthropic_api_key_here
DEFAULT_ANTHROPIC_MODEL=claude-sonnet-4-5-20250929

# Google Gemini Configuration
GEMINI_API_KEY=your_gemini_api_key_here
DEFAULT_GEMINI_MODEL=gemini-1.5-flash

# Image Upload Services
IMGBB_API_KEY=your_imgbb_api_key_here
FREEIMAGEHOST_API_KEY=your_freeimagehost_api_key_here

# HuggingFace (Future)
HUGGINGFACE_API_KEY=your_huggingface_api_key_here
# ══════════════════════════════════════════════════════════════
# OPTIONAL: Customize defaults
# ══════════════════════════════════════════════════════════════
# DEFAULT_LLM_CLIENT=openai
# DEFAULT_OPENAI_MODEL=gpt-4o
# OLLAMA_BASE_URL=http://localhost:11434/v1

# ══════════════════════════════════════════════════════════════
# OPTIONAL: Image upload (falls back to base64 if not set)
# ══════════════════════════════════════════════════════════════
# IMGBB_API_KEY=
# FREEIMAGEHOST_API_KEY=
42 changes: 28 additions & 14 deletions Agent/AgentKeywords.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,20 @@ class AgentKeywords:

def __init__(
self,
llm_client: str = "openai",
llm_model: str = "gpt-4o-mini",
llm_client: str | None = None,
llm_model: str | None = None,
platform_type: str = "auto",
click_mode: str = "xml",
input_mode: str = "text",
element_source: str = "accessibility",
llm_input_format: str = "som",
):
from Agent.config.config import Config

self.engine = AgentEngine(
llm_client=llm_client,
llm_client=llm_client or Config.DEFAULT_LLM_CLIENT,
llm_model=llm_model,
platform_type=platform_type,
click_mode=click_mode,
input_mode=input_mode,
element_source=element_source,
llm_input_format=llm_input_format,
)

# ----------------------- Public RF Keywords -----------------------
Expand Down Expand Up @@ -64,11 +66,23 @@ def find_visual_element(self, description: str, format: str = "center"):
"""
return self.engine.find_visual_element(description, format=format)

def autonumous(self, instruction: str):
"""Agent.Autonumous <instruction>
This keyword is designed to autonomously plan and execute a test based on the
given single instruction.
def set_element_source(self, source: str):
"""Agent.Set Element Source accessibility|vision
Example: Agent.Set Element Source vision
"""
self.engine.set_element_source(source)

# def set_llm_input_format(self, format: str):
# """Agent.Set LLM Input Format text|som
# Example: Agent.Set LLM Input Format som
# """
# self.engine.set_llm_input_format(format)

# def autonumous(self, instruction: str):
# """Agent.Autonumous <instruction>
# This keyword is designed to autonomously plan and execute a test based on the
# given single instruction.

Example: Agent.Autonumous Navigate to settings, change language to French,
... then go back to home screen and verify the interface is in French"""
raise NotImplementedError("Agent.Autonumous is not implemented yet")
# Example: Agent.Autonumous Navigate to settings, change language to French,
# ... then go back to home screen and verify the interface is in French"""
# raise NotImplementedError("Agent.Autonumous is not implemented yet")
2 changes: 1 addition & 1 deletion Agent/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

from Agent.AgentKeywords import AgentKeywords

__version__ = "0.1.0"
__version__ = "0.0.1"
__all__ = ["AgentKeywords"]


Expand Down
Loading
Loading