@arizeai/phoenix-client 7.15.0 → 7.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/README.md +47 -1
- package/dist/esm/__generated__/api/v1.d.ts +0 -9
- package/dist/esm/__generated__/api/v1.d.ts.map +1 -1
- package/dist/esm/constants/serverRequirements.d.ts +4 -0
- package/dist/esm/constants/serverRequirements.d.ts.map +1 -1
- package/dist/esm/constants/serverRequirements.js +28 -0
- package/dist/esm/constants/serverRequirements.js.map +1 -1
- package/dist/esm/projects/assignProjectAnnotationConfig.d.ts +41 -0
- package/dist/esm/projects/assignProjectAnnotationConfig.d.ts.map +1 -0
- package/dist/esm/projects/assignProjectAnnotationConfig.js +58 -0
- package/dist/esm/projects/assignProjectAnnotationConfig.js.map +1 -0
- package/dist/esm/projects/index.d.ts +5 -0
- package/dist/esm/projects/index.d.ts.map +1 -1
- package/dist/esm/projects/index.js +4 -0
- package/dist/esm/projects/index.js.map +1 -1
- package/dist/esm/projects/listProjectAnnotationConfigs.d.ts +37 -0
- package/dist/esm/projects/listProjectAnnotationConfigs.d.ts.map +1 -0
- package/dist/esm/projects/listProjectAnnotationConfigs.js +59 -0
- package/dist/esm/projects/listProjectAnnotationConfigs.js.map +1 -0
- package/dist/esm/projects/setProjectAnnotationConfigs.d.ts +52 -0
- package/dist/esm/projects/setProjectAnnotationConfigs.d.ts.map +1 -0
- package/dist/esm/projects/setProjectAnnotationConfigs.js +63 -0
- package/dist/esm/projects/setProjectAnnotationConfigs.js.map +1 -0
- package/dist/esm/projects/unassignProjectAnnotationConfig.d.ts +41 -0
- package/dist/esm/projects/unassignProjectAnnotationConfig.d.ts.map +1 -0
- package/dist/esm/projects/unassignProjectAnnotationConfig.js +55 -0
- package/dist/esm/projects/unassignProjectAnnotationConfig.js.map +1 -0
- package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
- package/dist/esm/types/annotationConfigs.d.ts +35 -0
- package/dist/esm/types/annotationConfigs.d.ts.map +1 -0
- package/dist/esm/types/annotationConfigs.js +12 -0
- package/dist/esm/types/annotationConfigs.js.map +1 -0
- package/dist/src/__generated__/api/v1.d.ts +0 -9
- package/dist/src/__generated__/api/v1.d.ts.map +1 -1
- package/dist/src/constants/serverRequirements.d.ts +4 -0
- package/dist/src/constants/serverRequirements.d.ts.map +1 -1
- package/dist/src/constants/serverRequirements.js +29 -1
- package/dist/src/constants/serverRequirements.js.map +1 -1
- package/dist/src/projects/assignProjectAnnotationConfig.d.ts +41 -0
- package/dist/src/projects/assignProjectAnnotationConfig.d.ts.map +1 -0
- package/dist/src/projects/assignProjectAnnotationConfig.js +65 -0
- package/dist/src/projects/assignProjectAnnotationConfig.js.map +1 -0
- package/dist/src/projects/index.d.ts +5 -0
- package/dist/src/projects/index.d.ts.map +1 -1
- package/dist/src/projects/index.js +4 -0
- package/dist/src/projects/index.js.map +1 -1
- package/dist/src/projects/listProjectAnnotationConfigs.d.ts +37 -0
- package/dist/src/projects/listProjectAnnotationConfigs.d.ts.map +1 -0
- package/dist/src/projects/listProjectAnnotationConfigs.js +67 -0
- package/dist/src/projects/listProjectAnnotationConfigs.js.map +1 -0
- package/dist/src/projects/setProjectAnnotationConfigs.d.ts +52 -0
- package/dist/src/projects/setProjectAnnotationConfigs.d.ts.map +1 -0
- package/dist/src/projects/setProjectAnnotationConfigs.js +70 -0
- package/dist/src/projects/setProjectAnnotationConfigs.js.map +1 -0
- package/dist/src/projects/unassignProjectAnnotationConfig.d.ts +41 -0
- package/dist/src/projects/unassignProjectAnnotationConfig.d.ts.map +1 -0
- package/dist/src/projects/unassignProjectAnnotationConfig.js +59 -0
- package/dist/src/projects/unassignProjectAnnotationConfig.js.map +1 -0
- package/dist/src/types/annotationConfigs.d.ts +35 -0
- package/dist/src/types/annotationConfigs.d.ts.map +1 -0
- package/dist/src/types/annotationConfigs.js +15 -0
- package/dist/src/types/annotationConfigs.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/docs/projects.mdx +55 -2
- package/package.json +1 -1
- package/src/__generated__/api/v1.ts +0 -9
- package/src/constants/serverRequirements.ts +32 -0
- package/src/projects/assignProjectAnnotationConfig.ts +78 -0
- package/src/projects/index.ts +8 -0
- package/src/projects/listProjectAnnotationConfigs.ts +85 -0
- package/src/projects/setProjectAnnotationConfigs.ts +86 -0
- package/src/projects/unassignProjectAnnotationConfig.ts +71 -0
- package/src/types/annotationConfigs.ts +37 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @arizeai/phoenix-client
|
|
2
2
|
|
|
3
|
+
## 7.16.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- f8ae2fc: Add `listProjectAnnotationConfigs`, `assignProjectAnnotationConfig`, `unassignProjectAnnotationConfig`, and `setProjectAnnotationConfigs` helpers to the `projects` subpath for managing which annotation configs a project uses.
|
|
8
|
+
|
|
3
9
|
## 7.15.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -750,7 +750,7 @@ await addSessionNote({
|
|
|
750
750
|
|
|
751
751
|
## Projects
|
|
752
752
|
|
|
753
|
-
The `@arizeai/phoenix-client` package provides a `projects` export for listing projects and managing their retention-policy assignments.
|
|
753
|
+
The `@arizeai/phoenix-client` package provides a `projects` export for listing projects and managing their retention-policy and annotation-config assignments.
|
|
754
754
|
|
|
755
755
|
### Fetching Projects
|
|
756
756
|
|
|
@@ -797,6 +797,52 @@ await setProjectRetentionPolicy({
|
|
|
797
797
|
|
|
798
798
|
This helper only changes a project's assignment to an existing policy. Creating, reading, updating, and deleting retention policies is outside the scope of the TypeScript projects helper.
|
|
799
799
|
|
|
800
|
+
### Assigning Annotation Configs
|
|
801
|
+
|
|
802
|
+
Use `assignProjectAnnotationConfig` and `unassignProjectAnnotationConfig` to add or remove a single annotation config. Select the project and the config by name or GlobalID. Both calls are idempotent. These helpers require Phoenix server `17.16.0` or newer.
|
|
803
|
+
|
|
804
|
+
```ts
|
|
805
|
+
import {
|
|
806
|
+
assignProjectAnnotationConfig,
|
|
807
|
+
listProjectAnnotationConfigs,
|
|
808
|
+
setProjectAnnotationConfigs,
|
|
809
|
+
unassignProjectAnnotationConfig,
|
|
810
|
+
} from "@arizeai/phoenix-client/projects";
|
|
811
|
+
|
|
812
|
+
await assignProjectAnnotationConfig({
|
|
813
|
+
projectName: "support-bot",
|
|
814
|
+
configName: "correctness",
|
|
815
|
+
});
|
|
816
|
+
|
|
817
|
+
await unassignProjectAnnotationConfig({
|
|
818
|
+
projectName: "support-bot",
|
|
819
|
+
configName: "correctness",
|
|
820
|
+
});
|
|
821
|
+
```
|
|
822
|
+
|
|
823
|
+
Use `setProjectAnnotationConfigs` to replace the whole set by config GlobalID. Pass an empty list to clear every assignment:
|
|
824
|
+
|
|
825
|
+
```ts
|
|
826
|
+
const configs = await listProjectAnnotationConfigs({
|
|
827
|
+
projectName: "support-bot",
|
|
828
|
+
});
|
|
829
|
+
|
|
830
|
+
// Keep only the categorical configs
|
|
831
|
+
await setProjectAnnotationConfigs({
|
|
832
|
+
projectName: "support-bot",
|
|
833
|
+
configIds: configs
|
|
834
|
+
.filter((config) => config.type === "CATEGORICAL")
|
|
835
|
+
.map((config) => config.id),
|
|
836
|
+
});
|
|
837
|
+
|
|
838
|
+
await setProjectAnnotationConfigs({
|
|
839
|
+
projectName: "support-bot",
|
|
840
|
+
configIds: [],
|
|
841
|
+
});
|
|
842
|
+
```
|
|
843
|
+
|
|
844
|
+
If a config name contains `/`, select it by `configId` instead. The server can't route a `/` in the URL path.
|
|
845
|
+
|
|
800
846
|
## Secrets
|
|
801
847
|
|
|
802
848
|
Use the `secrets` entrypoint to atomically create, update, or delete encrypted
|
|
@@ -3333,11 +3333,6 @@ export interface components {
|
|
|
3333
3333
|
* @description The description of the experiment
|
|
3334
3334
|
*/
|
|
3335
3335
|
description: string | null;
|
|
3336
|
-
/**
|
|
3337
|
-
* Sequence Number
|
|
3338
|
-
* @description The 1-based sequence number of the experiment within its dataset, in creation order.
|
|
3339
|
-
*/
|
|
3340
|
-
sequence_number: number;
|
|
3341
3336
|
/**
|
|
3342
3337
|
* Repetitions
|
|
3343
3338
|
* @description Number of times the experiment is repeated
|
|
@@ -9387,10 +9382,6 @@ export interface operations {
|
|
|
9387
9382
|
cursor?: string | null;
|
|
9388
9383
|
/** @description The max number of experiments to return at a time. */
|
|
9389
9384
|
limit?: number;
|
|
9390
|
-
/** @description Order by creation: 'desc' (default) returns newest experiments first, 'asc' returns oldest first so the lowest sequence numbers are on the first page. */
|
|
9391
|
-
sort_dir?: "asc" | "desc";
|
|
9392
|
-
/** @description When provided, return only the experiments with these 1-based per-dataset sequence numbers. */
|
|
9393
|
-
sequence_numbers?: number[] | null;
|
|
9394
9385
|
};
|
|
9395
9386
|
header?: never;
|
|
9396
9387
|
path: {
|