@arizeai/phoenix-client 6.6.0 → 6.6.1
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/dist/esm/__generated__/api/v1.d.ts +38 -124
- package/dist/esm/__generated__/api/v1.d.ts.map +1 -1
- package/dist/esm/experiments/resumeEvaluation.d.ts.map +1 -1
- package/dist/esm/experiments/resumeEvaluation.js +1 -2
- package/dist/esm/experiments/resumeEvaluation.js.map +1 -1
- package/dist/esm/experiments/resumeExperiment.d.ts.map +1 -1
- package/dist/esm/experiments/resumeExperiment.js +1 -2
- package/dist/esm/experiments/resumeExperiment.js.map +1 -1
- package/dist/esm/experiments/runExperiment.d.ts +1 -2
- package/dist/esm/experiments/runExperiment.d.ts.map +1 -1
- package/dist/esm/experiments/runExperiment.js +1 -2
- package/dist/esm/experiments/runExperiment.js.map +1 -1
- package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
- package/dist/esm/types/spans.d.ts +1 -1
- package/dist/esm/types/spans.d.ts.map +1 -1
- package/dist/esm/utils/formatPromptMessages.d.ts.map +1 -1
- package/dist/esm/utils/getPromptBySelector.d.ts.map +1 -1
- package/dist/src/__generated__/api/v1.d.ts +38 -124
- package/dist/src/__generated__/api/v1.d.ts.map +1 -1
- package/dist/src/experiments/resumeEvaluation.d.ts.map +1 -1
- package/dist/src/experiments/resumeEvaluation.js +3 -4
- package/dist/src/experiments/resumeEvaluation.js.map +1 -1
- package/dist/src/experiments/resumeExperiment.d.ts.map +1 -1
- package/dist/src/experiments/resumeExperiment.js +3 -4
- package/dist/src/experiments/resumeExperiment.js.map +1 -1
- package/dist/src/experiments/runExperiment.d.ts +1 -2
- package/dist/src/experiments/runExperiment.d.ts.map +1 -1
- package/dist/src/experiments/runExperiment.js +12 -13
- package/dist/src/experiments/runExperiment.js.map +1 -1
- package/dist/src/types/spans.d.ts +1 -1
- package/dist/src/types/spans.d.ts.map +1 -1
- package/dist/src/utils/formatPromptMessages.d.ts.map +1 -1
- package/dist/src/utils/getPromptBySelector.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/docs/experiments.mdx +7 -1
- package/package.json +3 -3
- package/src/__generated__/api/v1.ts +38 -124
- package/src/experiments/resumeEvaluation.ts +6 -10
- package/src/experiments/resumeExperiment.ts +6 -10
- package/src/experiments/runExperiment.ts +6 -10
- package/src/types/spans.ts +1 -1
package/docs/experiments.mdx
CHANGED
|
@@ -240,8 +240,13 @@ Each task run captures an OpenTelemetry trace ID. Evaluators can use `traceId` t
|
|
|
240
240
|
|
|
241
241
|
This pattern works best with `evaluateExperiment()` as a separate step after `runExperiment()`, so that all task spans are ingested into Phoenix before the evaluator queries them.
|
|
242
242
|
|
|
243
|
+
If you want to trace task code with helpers like `traceTool`, install `@arizeai/phoenix-otel` alongside `@arizeai/phoenix-client`:
|
|
244
|
+
|
|
245
|
+
```bash
|
|
246
|
+
npm install @arizeai/phoenix-client @arizeai/phoenix-otel
|
|
247
|
+
```
|
|
248
|
+
|
|
243
249
|
```ts
|
|
244
|
-
import { traceTool } from "@arizeai/openinference-core";
|
|
245
250
|
import { createClient } from "@arizeai/phoenix-client";
|
|
246
251
|
import { createDataset } from "@arizeai/phoenix-client/datasets";
|
|
247
252
|
import {
|
|
@@ -250,6 +255,7 @@ import {
|
|
|
250
255
|
runExperiment,
|
|
251
256
|
} from "@arizeai/phoenix-client/experiments";
|
|
252
257
|
import { getSpans } from "@arizeai/phoenix-client/spans";
|
|
258
|
+
import { traceTool } from "@arizeai/phoenix-otel";
|
|
253
259
|
|
|
254
260
|
const client = createClient();
|
|
255
261
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arizeai/phoenix-client",
|
|
3
|
-
"version": "6.6.
|
|
3
|
+
"version": "6.6.1",
|
|
4
4
|
"description": "A client for the Phoenix API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"arize",
|
|
@@ -73,14 +73,14 @@
|
|
|
73
73
|
}
|
|
74
74
|
},
|
|
75
75
|
"dependencies": {
|
|
76
|
-
"@arizeai/openinference-semantic-conventions": "^
|
|
76
|
+
"@arizeai/openinference-semantic-conventions": "^2.1.7",
|
|
77
77
|
"@arizeai/openinference-vercel": "^2.7.0",
|
|
78
78
|
"async": "^3.2.6",
|
|
79
79
|
"openapi-fetch": "^0.12.5",
|
|
80
80
|
"tiny-invariant": "^1.3.3",
|
|
81
81
|
"zod": "^4.0.14",
|
|
82
82
|
"@arizeai/phoenix-config": "0.1.3",
|
|
83
|
-
"@arizeai/phoenix-otel": "0.
|
|
83
|
+
"@arizeai/phoenix-otel": "1.0.0"
|
|
84
84
|
},
|
|
85
85
|
"devDependencies": {
|
|
86
86
|
"@ai-sdk/openai": "^3.0.29",
|
|
@@ -595,24 +595,6 @@ export interface paths {
|
|
|
595
595
|
patch?: never;
|
|
596
596
|
trace?: never;
|
|
597
597
|
};
|
|
598
|
-
"/v1/evaluations": {
|
|
599
|
-
parameters: {
|
|
600
|
-
query?: never;
|
|
601
|
-
header?: never;
|
|
602
|
-
path?: never;
|
|
603
|
-
cookie?: never;
|
|
604
|
-
};
|
|
605
|
-
/** Get span, trace, or document evaluations from a project */
|
|
606
|
-
get: operations["getEvaluations"];
|
|
607
|
-
put?: never;
|
|
608
|
-
/** Add span, trace, or document evaluations */
|
|
609
|
-
post: operations["addEvaluations"];
|
|
610
|
-
delete?: never;
|
|
611
|
-
options?: never;
|
|
612
|
-
head?: never;
|
|
613
|
-
patch?: never;
|
|
614
|
-
trace?: never;
|
|
615
|
-
};
|
|
616
598
|
"/v1/prompts": {
|
|
617
599
|
parameters: {
|
|
618
600
|
query?: never;
|
|
@@ -2954,7 +2936,27 @@ export interface components {
|
|
|
2954
2936
|
*/
|
|
2955
2937
|
end_time: string;
|
|
2956
2938
|
};
|
|
2957
|
-
/**
|
|
2939
|
+
/**
|
|
2940
|
+
* Span
|
|
2941
|
+
* @example {
|
|
2942
|
+
* "attributes": {
|
|
2943
|
+
* "llm.model_name": "gpt-4",
|
|
2944
|
+
* "llm.token_count.completion": 50,
|
|
2945
|
+
* "llm.token_count.prompt": 100
|
|
2946
|
+
* },
|
|
2947
|
+
* "context": {
|
|
2948
|
+
* "span_id": "1a2b3c4d5e6f7a8b",
|
|
2949
|
+
* "trace_id": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4"
|
|
2950
|
+
* },
|
|
2951
|
+
* "end_time": "2024-01-01T12:00:01Z",
|
|
2952
|
+
* "events": [],
|
|
2953
|
+
* "name": "llm_call",
|
|
2954
|
+
* "span_kind": "LLM",
|
|
2955
|
+
* "start_time": "2024-01-01T12:00:00Z",
|
|
2956
|
+
* "status_code": "OK",
|
|
2957
|
+
* "status_message": ""
|
|
2958
|
+
* }
|
|
2959
|
+
*/
|
|
2958
2960
|
Span: {
|
|
2959
2961
|
/**
|
|
2960
2962
|
* Id
|
|
@@ -3109,7 +3111,13 @@ export interface components {
|
|
|
3109
3111
|
/** Next Cursor */
|
|
3110
3112
|
next_cursor: string | null;
|
|
3111
3113
|
};
|
|
3112
|
-
/**
|
|
3114
|
+
/**
|
|
3115
|
+
* SpanContext
|
|
3116
|
+
* @example {
|
|
3117
|
+
* "span_id": "1a2b3c4d5e6f7a8b",
|
|
3118
|
+
* "trace_id": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4"
|
|
3119
|
+
* }
|
|
3120
|
+
*/
|
|
3113
3121
|
SpanContext: {
|
|
3114
3122
|
/**
|
|
3115
3123
|
* Trace Id
|
|
@@ -3161,7 +3169,16 @@ export interface components {
|
|
|
3161
3169
|
*/
|
|
3162
3170
|
document_position: number;
|
|
3163
3171
|
};
|
|
3164
|
-
/**
|
|
3172
|
+
/**
|
|
3173
|
+
* SpanEvent
|
|
3174
|
+
* @example {
|
|
3175
|
+
* "attributes": {
|
|
3176
|
+
* "exception.message": "Connection refused"
|
|
3177
|
+
* },
|
|
3178
|
+
* "name": "exception",
|
|
3179
|
+
* "timestamp": "2024-01-01T12:00:00Z"
|
|
3180
|
+
* }
|
|
3181
|
+
*/
|
|
3165
3182
|
SpanEvent: {
|
|
3166
3183
|
/**
|
|
3167
3184
|
* Name
|
|
@@ -5465,109 +5482,6 @@ export interface operations {
|
|
|
5465
5482
|
};
|
|
5466
5483
|
};
|
|
5467
5484
|
};
|
|
5468
|
-
getEvaluations: {
|
|
5469
|
-
parameters: {
|
|
5470
|
-
query?: {
|
|
5471
|
-
/** @description The name of the project to get evaluations from (if omitted, evaluations will be drawn from the `default` project) */
|
|
5472
|
-
project_name?: string | null;
|
|
5473
|
-
};
|
|
5474
|
-
header?: never;
|
|
5475
|
-
path?: never;
|
|
5476
|
-
cookie?: never;
|
|
5477
|
-
};
|
|
5478
|
-
requestBody?: never;
|
|
5479
|
-
responses: {
|
|
5480
|
-
/** @description Successful Response */
|
|
5481
|
-
200: {
|
|
5482
|
-
headers: {
|
|
5483
|
-
[name: string]: unknown;
|
|
5484
|
-
};
|
|
5485
|
-
content: {
|
|
5486
|
-
"application/json": unknown;
|
|
5487
|
-
};
|
|
5488
|
-
};
|
|
5489
|
-
/** @description Forbidden */
|
|
5490
|
-
403: {
|
|
5491
|
-
headers: {
|
|
5492
|
-
[name: string]: unknown;
|
|
5493
|
-
};
|
|
5494
|
-
content: {
|
|
5495
|
-
"text/plain": string;
|
|
5496
|
-
};
|
|
5497
|
-
};
|
|
5498
|
-
/** @description Not Found */
|
|
5499
|
-
404: {
|
|
5500
|
-
headers: {
|
|
5501
|
-
[name: string]: unknown;
|
|
5502
|
-
};
|
|
5503
|
-
content: {
|
|
5504
|
-
"text/plain": string;
|
|
5505
|
-
};
|
|
5506
|
-
};
|
|
5507
|
-
/** @description Validation Error */
|
|
5508
|
-
422: {
|
|
5509
|
-
headers: {
|
|
5510
|
-
[name: string]: unknown;
|
|
5511
|
-
};
|
|
5512
|
-
content: {
|
|
5513
|
-
"application/json": components["schemas"]["HTTPValidationError"];
|
|
5514
|
-
};
|
|
5515
|
-
};
|
|
5516
|
-
};
|
|
5517
|
-
};
|
|
5518
|
-
addEvaluations: {
|
|
5519
|
-
parameters: {
|
|
5520
|
-
query?: never;
|
|
5521
|
-
header?: {
|
|
5522
|
-
"content-type"?: string | null;
|
|
5523
|
-
"content-encoding"?: string | null;
|
|
5524
|
-
};
|
|
5525
|
-
path?: never;
|
|
5526
|
-
cookie?: never;
|
|
5527
|
-
};
|
|
5528
|
-
requestBody: {
|
|
5529
|
-
content: {
|
|
5530
|
-
"application/x-protobuf": string;
|
|
5531
|
-
"application/x-pandas-arrow": string;
|
|
5532
|
-
};
|
|
5533
|
-
};
|
|
5534
|
-
responses: {
|
|
5535
|
-
/** @description Successful Response */
|
|
5536
|
-
204: {
|
|
5537
|
-
headers: {
|
|
5538
|
-
[name: string]: unknown;
|
|
5539
|
-
};
|
|
5540
|
-
content?: never;
|
|
5541
|
-
};
|
|
5542
|
-
/** @description Forbidden */
|
|
5543
|
-
403: {
|
|
5544
|
-
headers: {
|
|
5545
|
-
[name: string]: unknown;
|
|
5546
|
-
};
|
|
5547
|
-
content: {
|
|
5548
|
-
"text/plain": string;
|
|
5549
|
-
};
|
|
5550
|
-
};
|
|
5551
|
-
/** @description Unsupported content type, only gzipped protobuf and pandas-arrow are supported */
|
|
5552
|
-
415: {
|
|
5553
|
-
headers: {
|
|
5554
|
-
[name: string]: unknown;
|
|
5555
|
-
};
|
|
5556
|
-
content: {
|
|
5557
|
-
"text/plain": string;
|
|
5558
|
-
};
|
|
5559
|
-
};
|
|
5560
|
-
/** @description Unprocessable Entity */
|
|
5561
|
-
422: {
|
|
5562
|
-
headers: {
|
|
5563
|
-
[name: string]: unknown;
|
|
5564
|
-
};
|
|
5565
|
-
content: {
|
|
5566
|
-
"text/plain": string;
|
|
5567
|
-
};
|
|
5568
|
-
};
|
|
5569
|
-
};
|
|
5570
|
-
};
|
|
5571
5485
|
getPrompts: {
|
|
5572
5486
|
parameters: {
|
|
5573
5487
|
query?: {
|
|
@@ -1,18 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
MimeType,
|
|
3
|
-
OpenInferenceSpanKind,
|
|
4
|
-
SemanticConventions,
|
|
5
|
-
} from "@arizeai/openinference-semantic-conventions";
|
|
6
|
-
import type {
|
|
7
|
-
GlobalTracerProviderRegistration,
|
|
8
|
-
NodeTracerProvider,
|
|
9
|
-
Tracer,
|
|
10
|
-
} from "@arizeai/phoenix-otel";
|
|
11
1
|
import {
|
|
12
2
|
attachGlobalTracerProvider,
|
|
13
3
|
type DiagLogLevel,
|
|
4
|
+
type GlobalTracerProviderRegistration,
|
|
5
|
+
MimeType,
|
|
6
|
+
type NodeTracerProvider,
|
|
14
7
|
objectAsAttributes,
|
|
8
|
+
OpenInferenceSpanKind,
|
|
15
9
|
register,
|
|
10
|
+
SemanticConventions,
|
|
11
|
+
type Tracer,
|
|
16
12
|
SpanStatusCode,
|
|
17
13
|
} from "@arizeai/phoenix-otel";
|
|
18
14
|
import invariant from "tiny-invariant";
|
|
@@ -1,18 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
MimeType,
|
|
3
|
-
OpenInferenceSpanKind,
|
|
4
|
-
SemanticConventions,
|
|
5
|
-
} from "@arizeai/openinference-semantic-conventions";
|
|
6
|
-
import type {
|
|
7
|
-
GlobalTracerProviderRegistration,
|
|
8
|
-
NodeTracerProvider,
|
|
9
|
-
Tracer,
|
|
10
|
-
} from "@arizeai/phoenix-otel";
|
|
11
1
|
import {
|
|
12
2
|
attachGlobalTracerProvider,
|
|
13
3
|
type DiagLogLevel,
|
|
4
|
+
type GlobalTracerProviderRegistration,
|
|
5
|
+
MimeType,
|
|
6
|
+
type NodeTracerProvider,
|
|
14
7
|
objectAsAttributes,
|
|
8
|
+
OpenInferenceSpanKind,
|
|
15
9
|
register,
|
|
10
|
+
SemanticConventions,
|
|
11
|
+
type Tracer,
|
|
16
12
|
SpanStatusCode,
|
|
17
13
|
} from "@arizeai/phoenix-otel";
|
|
18
14
|
import invariant from "tiny-invariant";
|
|
@@ -1,18 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
MimeType,
|
|
3
|
-
OpenInferenceSpanKind,
|
|
4
|
-
SemanticConventions,
|
|
5
|
-
} from "@arizeai/openinference-semantic-conventions";
|
|
6
|
-
import type {
|
|
7
|
-
GlobalTracerProviderRegistration,
|
|
8
|
-
NodeTracerProvider,
|
|
9
|
-
Tracer,
|
|
10
|
-
} from "@arizeai/phoenix-otel";
|
|
11
1
|
import {
|
|
12
2
|
attachGlobalTracerProvider,
|
|
13
3
|
createNoOpProvider,
|
|
14
4
|
type DiagLogLevel,
|
|
5
|
+
type GlobalTracerProviderRegistration,
|
|
6
|
+
MimeType,
|
|
7
|
+
type NodeTracerProvider,
|
|
15
8
|
objectAsAttributes,
|
|
9
|
+
OpenInferenceSpanKind,
|
|
10
|
+
SemanticConventions,
|
|
11
|
+
type Tracer,
|
|
16
12
|
register,
|
|
17
13
|
SpanStatusCode,
|
|
18
14
|
} from "@arizeai/phoenix-otel";
|
package/src/types/spans.ts
CHANGED