-
Notifications
You must be signed in to change notification settings - Fork 1
API Skill
Result object for synchronous skill execution.
Attributes:
- data (ChatReportOutput | None): The output data from the skill execution.
Result object for asynchronous skill execution.
Attributes:
- execution_id (str | None): The unique execution ID for tracking the async skill run.
Provides tools to interact with copilot skills directly.
Initialize the Skill client.
Parameters:
- config (ClientConfig): The client configuration.
- gql_client (GraphQlClient): The GraphQL client for API communication.
run(self, copilot_id: str, skill_name: str, parameters: dict | None, validate_parameters: bool) -> [RunSkillResult](API-Types#runskillresult)
Run a skill synchronously and return its full output.
Does not stream intermediate skill output.
Parameters:
- copilot_id (str): The ID of the copilot to run the skill on.
- skill_name (str): The name of the skill to execute.
- parameters (dict | None, optional): Dictionary of parameters to pass to the skill.
- validate_parameters (bool, optional): Whether to apply guardrails to parameters before execution. Defaults to False.
Returns:
RunSkillResult - The full output object of the skill execution.
run_async(self, copilot_id: str, skill_name: str, parameters: dict | None) -> [AsyncSkillRunResult](API-Types#asyncskillrunresult)
Start a skill execution asynchronously and return an execution ID immediately.
Parameters:
- copilot_id (str): The ID of the copilot to run the skill on.
- skill_name (str): The name of the skill to execute.
- parameters (dict | None, optional): Dictionary of parameters to pass to the skill.
Returns:
AsyncSkillRunResult - Result containing execution_id if successful.
Get the status and result of an async skill execution.
Parameters:
- execution_id (str): The execution ID returned from run_async.
Returns:
AsyncSkillStatusResponse - Result with status and data if completed, None if error occurs.
Update the loading message for the current skill execution.
Parameters:
- message (str): The loading message to display to the user.