@arizeai/phoenix-client
Version:
A client for the Phoenix API
18 lines • 534 B
JavaScript
/**
* Convert a SpanAnnotation to the API format
*/
export function toSpanAnnotationData(annotation) {
return {
span_id: annotation.spanId,
name: annotation.name,
annotator_kind: annotation.annotatorKind ?? "HUMAN",
result: {
label: annotation.label ?? null,
score: annotation.score ?? null,
explanation: null,
},
metadata: annotation.metadata ?? null,
identifier: annotation.identifier ?? "",
};
}
//# sourceMappingURL=types.js.map