Skip to main content

Annotations

Create an Annotation

Annotate a span
from orq_ai_sdk import Orq
import os

with Orq(
    api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:

    orq.annotations.create(trace_id="<id>", span_id="<id>", annotations=[])

    # Use the SDK ...

Delete an Annotation

Remove an annotation from a span
from orq_ai_sdk import Orq
import os

with Orq(
    api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:

    orq.annotations.delete(trace_id="<id>", span_id="<id>", keys=[
        "<value 1>",
    ])

    # Use the SDK ...