Sign in

Search runbooks for a given problem

There was a problem that the LLM was not able to address. Please rephrase your prompt and try again.
import json import copy cred_label = "dktoken" search_url = f"https://dev.dagknows.com/api/tasks/?with_pending_perms=false&page_key=0&page_size=10&q={problem}&knn.k=3&knn.nc=10&order_by=elastic&tags=tshoot" op = _rest_api("get", search_url, "", {}, "", cred_label) resp = op.json() tmptasks = [] for task in resp["tasks"]: tmptask = copy.deepcopy(task) for key, value in task.items(): if key not in ["title", "description", "input_params", "output_params", "id", "tags"]: tmptask.pop(key, None) tmptasks.append(tmptask) print(json.dumps(tmptasks, indent=4, default=str)) # print(json.dumps(op, indent=4)) relevant_runbooks = tmptasks
copied