MCPcopy Create free account
hub / github.com/Action-State-Labs/android-action-kernel / get_decision

Method get_decision

llm_providers.py:105–118  ·  view source on GitHub ↗
(self, goal: str, screen_context: str, action_history: List[Dict])

Source from the content-addressed store, hash-verified

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)
107 user_content = f"GOAL: {goal}\n\nSCREEN_CONTEXT:\n{screen_context}{history_str}"
108
109 response = self.client.chat.completions.create(
110 model=self.model,
111 response_format={"type": "json_object"},
112 messages=[
113 {"role": "system", "content": SYSTEM_PROMPT},
114 {"role": "user", "content": user_content}
115 ]
116 )
117
118 return json.loads(response.choices[0].message.content)
119
120
121class BedrockProvider(LLMProvider):

Callers

nothing calls this directly

Calls 1

format_action_historyFunction · 0.85

Tested by

no test coverage detected