Attach one or more annotations to a specific span. A standard annotation references a human review by key and supplies a value. A correction references an existing evaluator output by parent_annotation_id and supplies the corrected value, validated against that evaluator’s output schema.
from orq_ai_sdk import Orqimport oswith Orq( api_key=os.getenv("ORQ_API_KEY", ""),) as orq: orq.annotations.create(trace_id="<id>", span_id="<id>", annotations=[{"key": "quality", "value": "good"}]) # Use the SDK ...
Remove one or more annotations from a specific span by their evaluator keys, or remove corrections by the eval ids of their parent annotations.
from orq_ai_sdk import Orqimport oswith Orq( api_key=os.getenv("ORQ_API_KEY", ""),) as orq: orq.annotations.delete(trace_id="<id>", span_id="<id>", keys=["quality"]) # Use the SDK ...
import { Orq } from "@orq-ai/node";const orq = new Orq({ apiKey: process.env["ORQ_API_KEY"] ?? "",});async function run() { await orq.annotations.delete({ traceId: "<id>", spanId: "<id>", requestBody: { keys: ["quality"], }, });}run();