(self)
| 90 | """OpenAI and Groq provider (OpenAI-compatible API).""" |
| 91 | |
| 92 | def __init__(self): |
| 93 | from openai import OpenAI |
| 94 | |
| 95 | if Config.LLM_PROVIDER == "groq": |
| 96 | self.client = OpenAI( |
| 97 | api_key=Config.GROQ_API_KEY, |
| 98 | base_url=GROQ_API_BASE_URL |
| 99 | ) |
| 100 | self.model = Config.GROQ_MODEL |
| 101 | else: |
| 102 | self.client = OpenAI(api_key=Config.OPENAI_API_KEY) |
| 103 | self.model = Config.OPENAI_MODEL |
| 104 | |
| 105 | def get_decision(self, goal: str, screen_context: str, action_history: List[Dict]) -> Dict[str, Any]: |
| 106 | history_str = format_action_history(action_history) |
nothing calls this directly
no outgoing calls
no test coverage detected