MCPcopy
hub / github.com/CopilotKit/CopilotKit / _get_action

Method _get_action

sdk-python/copilotkit/sdk.py:254–267  ·  view source on GitHub ↗

Get an action by name

(
        self,
        *,
        context: CopilotKitContext,
        name: str,
    )

Source from the content-addressed store, hash-verified

252 }
253
254 def _get_action(
255 self,
256 *,
257 context: CopilotKitContext,
258 name: str,
259 ) -> Action:
260 """
261 Get an action by name
262 """
263 actions = self.actions(context) if callable(self.actions) else self.actions
264 action = next((action for action in actions if action.name == name), None)
265 if action is None:
266 raise ActionNotFoundException(name)
267 return action
268
269 def execute_action(
270 self,

Callers 1

execute_actionMethod · 0.95

Calls 2

nextFunction · 0.50

Tested by

no test coverage detected