module ai_query_api
+Global Variables
+-
+
- SEARCH_TASKS_ENDPOINT +
- CREATE_STEPS_ENDPOINT +
- UPDATE_STEP_ENDPOINT +
- GET_AGENTS_ENDPOINT +
- GET_BUILDER_STEPS_ENDPOINT +
- GET_TASK_STEPS_ENDPOINT +
- TASK_ENDPOINT +
- GET_TASK_ENDPOINT +
+ +
class AIQueryApi
+Represents the AI Query API.
+Args:
+-
+
opts
(BackendApiOptions): The backend API options
+
Methods:
+ - create_task
: Creates a task for an agent to execute
+ - create_steps
: Creates steps for a task
+ - update_step
: Updates a step
+ - search_tasks
: Searches for tasks
+ - get_task_with_steps
: Gets a task with its steps
+ - get_steps_from_task
: Gets the steps from a task
+ - get_steps
: Gets the steps
+ - get_tasks_from_agents
: Gets the tasks from the agents
+ - get_service_token
: Gets the service token
method __init__
+__init__(opts: BackendApiOptions)
+
++ +
method create_steps
+create_steps(did: str, task_id: str, steps: Any)
+
+Creates steps for a task.
+Args:
+-
+
did
(str): The DID of the service.
+task_id
(str): The task ID.
+steps
(Any): The steps to create.
+
+ +
method create_task
+create_task(did: str, task: Any, jwt: Optional[str] = None)
+
+Creates a task for an agent to execute.
+Args:
+-
+
did
(str): The DID of the service.
+task
(Any): The task to create.
+jwt
(Optional[str]): The JWT token.
+
+ +
method get_service_token
+get_service_token(service_did: str) → ServiceTokenResultDto
+
+Gets the service token.
+Args:
+-
+
service_did
(str): The DID of the service.
+
Returns:
+-
+
ServiceTokenResultDto
: The result of the creation operation.
+
Raises:
+-
+
HTTPError
: If the API call fails.
+
Example: + response = your_instance.get_service_token(service_did="did:nv:xyz789") print(response)
++ +
method get_steps
+get_steps(
+ status: AgentExecutionStatus = <AgentExecutionStatus.Pending: 'Pending'>,
+ dids: List[str] = []
+)
+
+Gets the steps.
+Args:
+-
+
status
(AgentExecutionStatus): The status of the steps.
+dids
(List[str]): The list of DIDs.
+
+ +
method get_steps_from_task
+get_steps_from_task(did: str, task_id: str, status: Optional[str] = None)
+
+Gets the steps from a task.
+Args:
+-
+
did
(str): The DID of the service.
+task_id
(str): The task ID.
+status
(Optional[str]): The status of the steps.
+
+ +
method get_task_with_steps
+get_task_with_steps(did: str, task_id: str, jwt: Optional[str] = None)
+
+Gets a task with its steps.
+Args:
+-
+
did
(str): The DID of the service.
+task_id
(str): The task ID.
+jwt
(Optional[str]): The JWT token.
+
+ +
method get_tasks_from_agents
+get_tasks_from_agents()
+
+Gets the tasks from the agents.
++ +
method search_tasks
+search_tasks(search_params: Any)
+
+Searches for tasks.
+Args:
+-
+
search_params
(Any): The search parameters.
+
+ +
method subscribe
+subscribe(callback: Any, events: Optional[str] = None)
+
++ +
method update_step
+update_step(
+ did: str,
+ task_id: str,
+ step_id: str,
+ step: Any,
+ jwt: Optional[str] = None
+)
+
+Updates a step.
+Args:
+-
+
did
(str): The DID of the service.
+task_id
(str): The task ID.
+step_id
(str): The step ID.
+step
(Any): The step to update.
+jwt
(Optional[str]): The JWT token.
+
+
This file was automatically generated via lazydocs.
+ +