@arizeai/phoenix-client
Version:
A client for the Phoenix API
13 lines (11 loc) • 421 B
text/typescript
import type { ExampleWithId } from "../../types/datasets";
/**
* The example's node GlobalID, which experiment runs record as their
* `dataset_example_id`. Servers that predate the `nodeId` field deliver the
* GlobalID in the `id` field instead.
*/
export function getExampleGlobalId(
example: Pick<ExampleWithId, "id"> & Partial<Pick<ExampleWithId, "nodeId">>
): string {
return example.nodeId ?? example.id;
}