@arizeai/phoenix-client 6.10.1 → 6.11.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/README.md +62 -0
- package/dist/esm/__generated__/api/v1.d.ts +254 -2
- package/dist/esm/__generated__/api/v1.d.ts.map +1 -1
- package/dist/esm/jest/index.d.ts +5 -0
- package/dist/esm/jest/index.d.ts.map +1 -0
- package/dist/esm/jest/index.js +49 -0
- package/dist/esm/jest/index.js.map +1 -0
- package/dist/esm/jest/reporter.d.ts +13 -0
- package/dist/esm/jest/reporter.d.ts.map +1 -0
- package/dist/esm/jest/reporter.js +19 -0
- package/dist/esm/jest/reporter.js.map +1 -0
- package/dist/esm/prompts/sdks/toAI.d.ts +2 -2
- package/dist/esm/prompts/sdks/toAI.d.ts.map +1 -1
- package/dist/esm/prompts/sdks/toAI.js.map +1 -1
- package/dist/esm/prompts/sdks/toAnthropic.d.ts +2 -2
- package/dist/esm/prompts/sdks/toAnthropic.d.ts.map +1 -1
- package/dist/esm/prompts/sdks/toAnthropic.js.map +1 -1
- package/dist/esm/prompts/sdks/toOpenAI.d.ts +2 -2
- package/dist/esm/prompts/sdks/toOpenAI.d.ts.map +1 -1
- package/dist/esm/prompts/sdks/toOpenAI.js.map +1 -1
- package/dist/esm/prompts/sdks/toSDK.d.ts +8 -8
- package/dist/esm/prompts/sdks/toSDK.d.ts.map +1 -1
- package/dist/esm/prompts/sdks/toSDK.js.map +1 -1
- package/dist/esm/prompts/sdks/types.d.ts +2 -2
- package/dist/esm/prompts/sdks/types.d.ts.map +1 -1
- package/dist/esm/schemas/llm/anthropic/converters.d.ts +8 -8
- package/dist/esm/schemas/llm/anthropic/messagePartSchemas.d.ts +4 -4
- package/dist/esm/schemas/llm/anthropic/messageSchemas.d.ts +6 -6
- package/dist/esm/schemas/llm/constants.d.ts +3 -3
- package/dist/esm/schemas/llm/converters.d.ts +12 -12
- package/dist/esm/schemas/llm/openai/converters.d.ts +3 -3
- package/dist/esm/schemas/llm/schemas.d.ts +2 -2
- package/dist/esm/testing/acceptance.d.ts +20 -0
- package/dist/esm/testing/acceptance.d.ts.map +1 -0
- package/dist/esm/testing/acceptance.js +129 -0
- package/dist/esm/testing/acceptance.js.map +1 -0
- package/dist/esm/testing/define-api.d.ts +157 -0
- package/dist/esm/testing/define-api.d.ts.map +1 -0
- package/dist/esm/testing/define-api.js +78 -0
- package/dist/esm/testing/define-api.js.map +1 -0
- package/dist/esm/testing/helpers.d.ts +55 -0
- package/dist/esm/testing/helpers.d.ts.map +1 -0
- package/dist/esm/testing/helpers.js +179 -0
- package/dist/esm/testing/helpers.js.map +1 -0
- package/dist/esm/testing/phoenix-test-tracking.d.ts +68 -0
- package/dist/esm/testing/phoenix-test-tracking.d.ts.map +1 -0
- package/dist/esm/testing/phoenix-test-tracking.js +521 -0
- package/dist/esm/testing/phoenix-test-tracking.js.map +1 -0
- package/dist/esm/testing/report-artifacts.d.ts +45 -0
- package/dist/esm/testing/report-artifacts.d.ts.map +1 -0
- package/dist/esm/testing/report-artifacts.js +218 -0
- package/dist/esm/testing/report-artifacts.js.map +1 -0
- package/dist/esm/testing/report-run.d.ts +22 -0
- package/dist/esm/testing/report-run.d.ts.map +1 -0
- package/dist/esm/testing/report-run.js +41 -0
- package/dist/esm/testing/report-run.js.map +1 -0
- package/dist/esm/testing/reporter-format.d.ts +83 -0
- package/dist/esm/testing/reporter-format.d.ts.map +1 -0
- package/dist/esm/testing/reporter-format.js +852 -0
- package/dist/esm/testing/reporter-format.js.map +1 -0
- package/dist/esm/testing/runner.d.ts +31 -0
- package/dist/esm/testing/runner.d.ts.map +1 -0
- package/dist/esm/testing/runner.js +238 -0
- package/dist/esm/testing/runner.js.map +1 -0
- package/dist/esm/testing/state.d.ts +138 -0
- package/dist/esm/testing/state.d.ts.map +1 -0
- package/dist/esm/testing/state.js +31 -0
- package/dist/esm/testing/state.js.map +1 -0
- package/dist/esm/testing/types.d.ts +319 -0
- package/dist/esm/testing/types.d.ts.map +1 -0
- package/dist/esm/testing/types.js +9 -0
- package/dist/esm/testing/types.js.map +1 -0
- package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
- package/dist/esm/utils/channel.d.ts +7 -7
- package/dist/esm/utils/channel.d.ts.map +1 -1
- package/dist/esm/utils/channel.js +1 -1
- package/dist/esm/utils/channel.js.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/esm/utils/promisifyResult.d.ts +1 -1
- package/dist/esm/utils/promisifyResult.d.ts.map +1 -1
- package/dist/esm/utils/promisifyResult.js.map +1 -1
- package/dist/esm/utils/schemaMatches.d.ts +5 -5
- package/dist/esm/utils/schemaMatches.d.ts.map +1 -1
- package/dist/esm/utils/schemaMatches.js.map +1 -1
- package/dist/esm/vitest/index.d.ts +5 -0
- package/dist/esm/vitest/index.d.ts.map +1 -0
- package/dist/esm/vitest/index.js +15 -0
- package/dist/esm/vitest/index.js.map +1 -0
- package/dist/esm/vitest/reporter.d.ts +19 -0
- package/dist/esm/vitest/reporter.d.ts.map +1 -0
- package/dist/esm/vitest/reporter.js +27 -0
- package/dist/esm/vitest/reporter.js.map +1 -0
- package/dist/src/__generated__/api/v1.d.ts +254 -2
- package/dist/src/__generated__/api/v1.d.ts.map +1 -1
- package/dist/src/jest/index.d.ts +5 -0
- package/dist/src/jest/index.d.ts.map +1 -0
- package/dist/src/jest/index.js +58 -0
- package/dist/src/jest/index.js.map +1 -0
- package/dist/src/jest/reporter.d.ts +13 -0
- package/dist/src/jest/reporter.d.ts.map +1 -0
- package/dist/src/jest/reporter.js +23 -0
- package/dist/src/jest/reporter.js.map +1 -0
- package/dist/src/prompts/sdks/toAI.d.ts +2 -2
- package/dist/src/prompts/sdks/toAI.d.ts.map +1 -1
- package/dist/src/prompts/sdks/toAI.js.map +1 -1
- package/dist/src/prompts/sdks/toAnthropic.d.ts +2 -2
- package/dist/src/prompts/sdks/toAnthropic.d.ts.map +1 -1
- package/dist/src/prompts/sdks/toAnthropic.js.map +1 -1
- package/dist/src/prompts/sdks/toOpenAI.d.ts +2 -2
- package/dist/src/prompts/sdks/toOpenAI.d.ts.map +1 -1
- package/dist/src/prompts/sdks/toOpenAI.js.map +1 -1
- package/dist/src/prompts/sdks/toSDK.d.ts +8 -8
- package/dist/src/prompts/sdks/toSDK.d.ts.map +1 -1
- package/dist/src/prompts/sdks/toSDK.js.map +1 -1
- package/dist/src/prompts/sdks/types.d.ts +2 -2
- package/dist/src/prompts/sdks/types.d.ts.map +1 -1
- package/dist/src/schemas/llm/anthropic/converters.d.ts +8 -8
- package/dist/src/schemas/llm/anthropic/messagePartSchemas.d.ts +4 -4
- package/dist/src/schemas/llm/anthropic/messageSchemas.d.ts +6 -6
- package/dist/src/schemas/llm/constants.d.ts +3 -3
- package/dist/src/schemas/llm/converters.d.ts +12 -12
- package/dist/src/schemas/llm/openai/converters.d.ts +3 -3
- package/dist/src/schemas/llm/schemas.d.ts +2 -2
- package/dist/src/testing/acceptance.d.ts +20 -0
- package/dist/src/testing/acceptance.d.ts.map +1 -0
- package/dist/src/testing/acceptance.js +114 -0
- package/dist/src/testing/acceptance.js.map +1 -0
- package/dist/src/testing/define-api.d.ts +157 -0
- package/dist/src/testing/define-api.d.ts.map +1 -0
- package/dist/src/testing/define-api.js +81 -0
- package/dist/src/testing/define-api.js.map +1 -0
- package/dist/src/testing/helpers.d.ts +55 -0
- package/dist/src/testing/helpers.d.ts.map +1 -0
- package/dist/src/testing/helpers.js +182 -0
- package/dist/src/testing/helpers.js.map +1 -0
- package/dist/src/testing/phoenix-test-tracking.d.ts +68 -0
- package/dist/src/testing/phoenix-test-tracking.d.ts.map +1 -0
- package/dist/src/testing/phoenix-test-tracking.js +530 -0
- package/dist/src/testing/phoenix-test-tracking.js.map +1 -0
- package/dist/src/testing/report-artifacts.d.ts +45 -0
- package/dist/src/testing/report-artifacts.d.ts.map +1 -0
- package/dist/src/testing/report-artifacts.js +225 -0
- package/dist/src/testing/report-artifacts.js.map +1 -0
- package/dist/src/testing/report-run.d.ts +22 -0
- package/dist/src/testing/report-run.d.ts.map +1 -0
- package/dist/src/testing/report-run.js +47 -0
- package/dist/src/testing/report-run.js.map +1 -0
- package/dist/src/testing/reporter-format.d.ts +83 -0
- package/dist/src/testing/reporter-format.d.ts.map +1 -0
- package/dist/src/testing/reporter-format.js +870 -0
- package/dist/src/testing/reporter-format.js.map +1 -0
- package/dist/src/testing/runner.d.ts +31 -0
- package/dist/src/testing/runner.d.ts.map +1 -0
- package/dist/src/testing/runner.js +258 -0
- package/dist/src/testing/runner.js.map +1 -0
- package/dist/src/testing/state.d.ts +138 -0
- package/dist/src/testing/state.d.ts.map +1 -0
- package/dist/src/testing/state.js +38 -0
- package/dist/src/testing/state.js.map +1 -0
- package/dist/src/testing/types.d.ts +319 -0
- package/dist/src/testing/types.d.ts.map +1 -0
- package/dist/src/testing/types.js +13 -0
- package/dist/src/testing/types.js.map +1 -0
- package/dist/src/utils/channel.d.ts +7 -7
- package/dist/src/utils/channel.d.ts.map +1 -1
- package/dist/src/utils/channel.js +1 -1
- package/dist/src/utils/channel.js.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/src/utils/promisifyResult.d.ts +1 -1
- package/dist/src/utils/promisifyResult.d.ts.map +1 -1
- package/dist/src/utils/promisifyResult.js.map +1 -1
- package/dist/src/utils/schemaMatches.d.ts +5 -5
- package/dist/src/utils/schemaMatches.d.ts.map +1 -1
- package/dist/src/utils/schemaMatches.js.map +1 -1
- package/dist/src/vitest/index.d.ts +5 -0
- package/dist/src/vitest/index.d.ts.map +1 -0
- package/dist/src/vitest/index.js +23 -0
- package/dist/src/vitest/index.js.map +1 -0
- package/dist/src/vitest/reporter.d.ts +19 -0
- package/dist/src/vitest/reporter.d.ts.map +1 -0
- package/dist/src/vitest/reporter.js +34 -0
- package/dist/src/vitest/reporter.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/docs/ci-evals-annotations.mdx +190 -0
- package/docs/ci-evals-jest.mdx +78 -0
- package/docs/ci-evals-vitest.mdx +240 -0
- package/docs/ci-evals.mdx +263 -0
- package/docs/overview.mdx +9 -1
- package/package.json +49 -17
- package/src/__generated__/api/v1.ts +254 -2
- package/src/jest/index.ts +124 -0
- package/src/jest/reporter.ts +22 -0
- package/src/prompts/sdks/toAI.ts +4 -3
- package/src/prompts/sdks/toAnthropic.ts +4 -3
- package/src/prompts/sdks/toOpenAI.ts +4 -3
- package/src/prompts/sdks/toSDK.ts +16 -11
- package/src/prompts/sdks/types.ts +2 -2
- package/src/testing/acceptance.ts +190 -0
- package/src/testing/define-api.ts +279 -0
- package/src/testing/helpers.ts +251 -0
- package/src/testing/phoenix-test-tracking.ts +637 -0
- package/src/testing/report-artifacts.ts +272 -0
- package/src/testing/report-run.ts +44 -0
- package/src/testing/reporter-format.ts +1072 -0
- package/src/testing/runner.ts +350 -0
- package/src/testing/state.ts +165 -0
- package/src/testing/types.ts +366 -0
- package/src/utils/channel.ts +17 -15
- package/src/utils/promisifyResult.ts +6 -4
- package/src/utils/schemaMatches.ts +12 -10
- package/src/vitest/index.ts +57 -0
- package/src/vitest/reporter.ts +32 -0
package/README.md
CHANGED
|
@@ -298,6 +298,68 @@ const experiment = await runExperiment({
|
|
|
298
298
|
|
|
299
299
|
> **Hint:** Tasks and evaluators are instrumented using [OpenTelemetry](https://opentelemetry.io/). You can view detailed traces of experiment runs and evaluations directly in the Phoenix UI for debugging and performance analysis.
|
|
300
300
|
|
|
301
|
+
## Eval Tests
|
|
302
|
+
|
|
303
|
+
The package also exposes Vitest and Jest submodules for writing
|
|
304
|
+
dataset-backed evaluations as normal test suites.
|
|
305
|
+
|
|
306
|
+
```bash
|
|
307
|
+
npm install -D @arizeai/phoenix-client vitest dotenv
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
```ts
|
|
311
|
+
import * as px from "@arizeai/phoenix-client/vitest";
|
|
312
|
+
import { expect } from "vitest";
|
|
313
|
+
|
|
314
|
+
px.describe(
|
|
315
|
+
"text-to-sql",
|
|
316
|
+
() => {
|
|
317
|
+
px.test(
|
|
318
|
+
"select all",
|
|
319
|
+
{
|
|
320
|
+
input: { userQuery: "Get all users" },
|
|
321
|
+
expected: { sql: "SELECT * FROM users;" },
|
|
322
|
+
},
|
|
323
|
+
async ({ input, expected }) => {
|
|
324
|
+
const sql = await generateSql(input.userQuery);
|
|
325
|
+
px.logOutput({ sql });
|
|
326
|
+
expect(sql).toEqual(expected?.sql);
|
|
327
|
+
}
|
|
328
|
+
);
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
acceptanceCriteria: [
|
|
332
|
+
// every test must pass (100% of the auto-logged `pass` boolean is true)
|
|
333
|
+
{
|
|
334
|
+
annotationName: "pass",
|
|
335
|
+
metric: "passRate",
|
|
336
|
+
passFn: (a) => a.score === true,
|
|
337
|
+
minPassRate: 1,
|
|
338
|
+
},
|
|
339
|
+
],
|
|
340
|
+
}
|
|
341
|
+
);
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
The reference output can be supplied under any one of three interchangeable
|
|
345
|
+
keys — `expected`, `reference`, or `output` — so you can match whichever name
|
|
346
|
+
your evaluators expect. They all resolve to the same slot: the dataset
|
|
347
|
+
example's `output`, exposed to evaluators and the test body as `expected`.
|
|
348
|
+
Supplying more than one at a time is a type error.
|
|
349
|
+
|
|
350
|
+
Use `@arizeai/phoenix-client/vitest/reporter` or
|
|
351
|
+
`@arizeai/phoenix-client/jest/reporter` to print Phoenix dataset and
|
|
352
|
+
experiment links, annotation aggregates, and acceptance criteria at the end
|
|
353
|
+
of a run. Acceptance criteria gate the suite after it finishes — `average`
|
|
354
|
+
checks an aggregate bar (so CI can allow a mean of 80% while still running
|
|
355
|
+
every case), and `passRate` requires a minimum fraction of runs to satisfy a
|
|
356
|
+
per-run `passFn` predicate.
|
|
357
|
+
|
|
358
|
+
See the [`docs/`](./docs) folder — `ci-evals.mdx`, `ci-evals-vitest.mdx`,
|
|
359
|
+
`ci-evals-jest.mdx`, and `ci-evals-annotations.mdx` — for setup, the full
|
|
360
|
+
`describe` / `test` / `test.each` API, acceptance criteria, repetitions,
|
|
361
|
+
dry-run mode, and annotation details.
|
|
362
|
+
|
|
301
363
|
## Traces
|
|
302
364
|
|
|
303
365
|
The `@arizeai/phoenix-client` package provides a `traces` export for retrieving trace data from Phoenix projects.
|
|
@@ -387,7 +387,11 @@ export interface paths {
|
|
|
387
387
|
delete: operations["deleteExperiment"];
|
|
388
388
|
options?: never;
|
|
389
389
|
head?: never;
|
|
390
|
-
|
|
390
|
+
/**
|
|
391
|
+
* Update an experiment by ID
|
|
392
|
+
* @description Partially update an experiment's name, description, and/or metadata. Only the fields included in the request body are changed; omitted fields are left as-is. Patching an ephemeral experiment refreshes its last-update timestamp, which extends the window before it is swept away.
|
|
393
|
+
*/
|
|
394
|
+
patch: operations["updateExperiment"];
|
|
391
395
|
trace?: never;
|
|
392
396
|
};
|
|
393
397
|
"/v1/experiments/{experiment_id}/incomplete-runs": {
|
|
@@ -1293,6 +1297,23 @@ export interface paths {
|
|
|
1293
1297
|
patch?: never;
|
|
1294
1298
|
trace?: never;
|
|
1295
1299
|
};
|
|
1300
|
+
"/agents/server/sessions/{session_id}/chat": {
|
|
1301
|
+
parameters: {
|
|
1302
|
+
query?: never;
|
|
1303
|
+
header?: never;
|
|
1304
|
+
path?: never;
|
|
1305
|
+
cookie?: never;
|
|
1306
|
+
};
|
|
1307
|
+
get?: never;
|
|
1308
|
+
put?: never;
|
|
1309
|
+
/** Run Server Agent */
|
|
1310
|
+
post: operations["run_server_agent_agents_server_sessions__session_id__chat_post"];
|
|
1311
|
+
delete?: never;
|
|
1312
|
+
options?: never;
|
|
1313
|
+
head?: never;
|
|
1314
|
+
patch?: never;
|
|
1315
|
+
trace?: never;
|
|
1316
|
+
};
|
|
1296
1317
|
"/agents/{agent_id}/sessions/{session_id}/chat": {
|
|
1297
1318
|
parameters: {
|
|
1298
1319
|
query?: never;
|
|
@@ -1609,7 +1630,7 @@ export interface components {
|
|
|
1609
1630
|
* ChatContext
|
|
1610
1631
|
* @description Discriminated union of every UI-state context the agent understands.
|
|
1611
1632
|
*/
|
|
1612
|
-
ChatContext: components["schemas"]["AppContext"] | components["schemas"]["ProjectContext"] | components["schemas"]["TraceContext"] | components["schemas"]["AgentSpanContext"] | components["schemas"]["PlaygroundContext"] | components["schemas"]["CodeEvaluatorContext"] | components["schemas"]["LlmEvaluatorContext"] | components["schemas"]["DatasetContext"] | components["schemas"]["GraphQLContext"] | components["schemas"]["WebAccessContext"];
|
|
1633
|
+
ChatContext: components["schemas"]["AppContext"] | components["schemas"]["ProjectContext"] | components["schemas"]["TraceContext"] | components["schemas"]["SessionContext"] | components["schemas"]["PromptContext"] | components["schemas"]["PromptVersionContext"] | components["schemas"]["AgentSpanContext"] | components["schemas"]["PlaygroundContext"] | components["schemas"]["CodeEvaluatorContext"] | components["schemas"]["LlmEvaluatorContext"] | components["schemas"]["DatasetContext"] | components["schemas"]["GraphQLContext"] | components["schemas"]["WebAccessContext"] | components["schemas"]["SubagentsContext"];
|
|
1613
1634
|
/**
|
|
1614
1635
|
* ChatRegenerateMessage
|
|
1615
1636
|
* @description Regenerate message extended with Phoenix-specific fields.
|
|
@@ -1636,6 +1657,12 @@ export interface components {
|
|
|
1636
1657
|
* @default false
|
|
1637
1658
|
*/
|
|
1638
1659
|
exportRemoteTraces?: boolean;
|
|
1660
|
+
/**
|
|
1661
|
+
* Attachuserid
|
|
1662
|
+
* @description When true and the request is authenticated as a PhoenixUser, attaches the user's email as the OpenInference ``user.id`` span attribute on all traced work for this request.
|
|
1663
|
+
* @default false
|
|
1664
|
+
*/
|
|
1665
|
+
attachUserId?: boolean;
|
|
1639
1666
|
/** Contexts */
|
|
1640
1667
|
contexts?: components["schemas"]["ChatContext"][];
|
|
1641
1668
|
/**
|
|
@@ -1683,6 +1710,12 @@ export interface components {
|
|
|
1683
1710
|
* @default false
|
|
1684
1711
|
*/
|
|
1685
1712
|
exportRemoteTraces?: boolean;
|
|
1713
|
+
/**
|
|
1714
|
+
* Attachuserid
|
|
1715
|
+
* @description When true and the request is authenticated as a PhoenixUser, attaches the user's email as the OpenInference ``user.id`` span attribute on all traced work for this request.
|
|
1716
|
+
* @default false
|
|
1717
|
+
*/
|
|
1718
|
+
attachUserId?: boolean;
|
|
1686
1719
|
/** Contexts */
|
|
1687
1720
|
contexts?: components["schemas"]["ChatContext"][];
|
|
1688
1721
|
/**
|
|
@@ -2354,6 +2387,16 @@ export interface components {
|
|
|
2354
2387
|
* @description The ID of the dataset version associated with the experiment
|
|
2355
2388
|
*/
|
|
2356
2389
|
dataset_version_id: string;
|
|
2390
|
+
/**
|
|
2391
|
+
* Name
|
|
2392
|
+
* @description The name of the experiment
|
|
2393
|
+
*/
|
|
2394
|
+
name: string;
|
|
2395
|
+
/**
|
|
2396
|
+
* Description
|
|
2397
|
+
* @description The description of the experiment
|
|
2398
|
+
*/
|
|
2399
|
+
description: string | null;
|
|
2357
2400
|
/**
|
|
2358
2401
|
* Repetitions
|
|
2359
2402
|
* @description Number of times the experiment is repeated
|
|
@@ -3174,6 +3217,7 @@ export interface components {
|
|
|
3174
3217
|
* @default 1
|
|
3175
3218
|
*/
|
|
3176
3219
|
repetitions?: number;
|
|
3220
|
+
nextExperimentScaffold?: components["schemas"]["PlaygroundExperimentScaffoldContext"] | null;
|
|
3177
3221
|
/** Instances */
|
|
3178
3222
|
instances?: components["schemas"]["PlaygroundInstanceContext"][];
|
|
3179
3223
|
/** Evaluators */
|
|
@@ -3218,6 +3262,37 @@ export interface components {
|
|
|
3218
3262
|
/** Isapplied */
|
|
3219
3263
|
isApplied: boolean;
|
|
3220
3264
|
};
|
|
3265
|
+
/**
|
|
3266
|
+
* PlaygroundExperimentScaffoldContext
|
|
3267
|
+
* @description Experiment name/description/metadata the user has staged for the playground's
|
|
3268
|
+
* *next* dataset-backed run, before that run has started.
|
|
3269
|
+
*
|
|
3270
|
+
* The playground UI lets the user pre-set how the next recorded run's experiment
|
|
3271
|
+
* will be named, described, and tagged (via the ``set_playground_experiment_recording``
|
|
3272
|
+
* tool or the recording form). That staged state is surfaced here so the agent can
|
|
3273
|
+
* see what is already set and avoid re-staging it.
|
|
3274
|
+
*
|
|
3275
|
+
* Field semantics:
|
|
3276
|
+
* - ``name`` / ``description``: the staged values, surfaced to the model verbatim,
|
|
3277
|
+
* or ``None`` when the user has not staged them.
|
|
3278
|
+
* - ``has_metadata``: a presence flag, not the value. Only *whether* metadata has
|
|
3279
|
+
* been staged is model-relevant (so the agent knows not to re-attach it); the
|
|
3280
|
+
* metadata object itself is deliberately kept out of the prompt.
|
|
3281
|
+
*
|
|
3282
|
+
* A field left unstaged (``None`` / ``False``) falls back to the server default when
|
|
3283
|
+
* the run starts. The scaffold is consumed once that next run begins.
|
|
3284
|
+
*/
|
|
3285
|
+
PlaygroundExperimentScaffoldContext: {
|
|
3286
|
+
/** Name */
|
|
3287
|
+
name?: string | null;
|
|
3288
|
+
/** Description */
|
|
3289
|
+
description?: string | null;
|
|
3290
|
+
/**
|
|
3291
|
+
* Hasmetadata
|
|
3292
|
+
* @default false
|
|
3293
|
+
*/
|
|
3294
|
+
hasMetadata?: boolean;
|
|
3295
|
+
};
|
|
3221
3296
|
/**
|
|
3222
3297
|
* PlaygroundInstanceContext
|
|
3223
3298
|
* @description One mounted playground instance and its current model selection.
|
|
@@ -3459,6 +3534,19 @@ export interface components {
|
|
|
3459
3534
|
/** Messages */
|
|
3460
3535
|
messages: components["schemas"]["PromptMessage"][];
|
|
3461
3536
|
};
|
|
3537
|
+
/**
|
|
3538
|
+
* PromptContext
|
|
3539
|
+
* @description Prompt the user is currently viewing.
|
|
3540
|
+
*/
|
|
3541
|
+
PromptContext: {
|
|
3542
|
+
/**
|
|
3543
|
+
* @description discriminator enum property added by openapi-typescript
|
|
3544
|
+
* @enum {string}
|
|
3545
|
+
*/
|
|
3546
|
+
type: "prompt";
|
|
3547
|
+
/** Promptnodeid */
|
|
3548
|
+
promptNodeId: string;
|
|
3549
|
+
};
|
|
3462
3550
|
/** PromptData */
|
|
3463
3551
|
PromptData: {
|
|
3464
3552
|
name: components["schemas"]["Identifier"];
|
|
@@ -3959,6 +4047,21 @@ export interface components {
|
|
|
3959
4047
|
/** Id */
|
|
3960
4048
|
id: string;
|
|
3961
4049
|
};
|
|
4050
|
+
/**
|
|
4051
|
+
* PromptVersionContext
|
|
4052
|
+
* @description Prompt version the user is currently viewing.
|
|
4053
|
+
*/
|
|
4054
|
+
PromptVersionContext: {
|
|
4055
|
+
/**
|
|
4056
|
+
* @description discriminator enum property added by openapi-typescript
|
|
4057
|
+
* @enum {string}
|
|
4058
|
+
*/
|
|
4059
|
+
type: "prompt_version";
|
|
4060
|
+
/** Promptnodeid */
|
|
4061
|
+
promptNodeId: string;
|
|
4062
|
+
/** Promptversionnodeid */
|
|
4063
|
+
promptVersionNodeId: string;
|
|
4064
|
+
};
|
|
3962
4065
|
/** PromptVersionData */
|
|
3963
4066
|
PromptVersionData: {
|
|
3964
4067
|
/** Description */
|
|
@@ -4160,6 +4263,21 @@ export interface components {
|
|
|
4160
4263
|
/** Next Cursor */
|
|
4161
4264
|
next_cursor: string | null;
|
|
4162
4265
|
};
|
|
4266
|
+
/**
|
|
4267
|
+
* SessionContext
|
|
4268
|
+
* @description Session the user is currently viewing.
|
|
4269
|
+
*/
|
|
4270
|
+
SessionContext: {
|
|
4271
|
+
/**
|
|
4272
|
+
* @description discriminator enum property added by openapi-typescript
|
|
4273
|
+
* @enum {string}
|
|
4274
|
+
*/
|
|
4275
|
+
type: "session";
|
|
4276
|
+
/** Projectnodeid */
|
|
4277
|
+
projectNodeId: string;
|
|
4278
|
+
/** Sessionnodeid */
|
|
4279
|
+
sessionNodeId: string;
|
|
4280
|
+
};
|
|
4163
4281
|
/** SessionData */
|
|
4164
4282
|
SessionData: {
|
|
4165
4283
|
/** Id */
|
|
@@ -4586,6 +4704,19 @@ export interface components {
|
|
|
4586
4704
|
*/
|
|
4587
4705
|
type?: "step-start";
|
|
4588
4706
|
};
|
|
4707
|
+
/**
|
|
4708
|
+
* SubagentsContext
|
|
4709
|
+
* @description User's per-turn request to expose the subagent-spawning tool.
|
|
4710
|
+
*/
|
|
4711
|
+
SubagentsContext: {
|
|
4712
|
+
/**
|
|
4713
|
+
* @description discriminator enum property added by openapi-typescript
|
|
4714
|
+
* @enum {string}
|
|
4715
|
+
*/
|
|
4716
|
+
type: "subagents";
|
|
4717
|
+
/** Enabled */
|
|
4718
|
+
enabled: boolean;
|
|
4719
|
+
};
|
|
4589
4720
|
/** TextContentPart */
|
|
4590
4721
|
TextContentPart: {
|
|
4591
4722
|
/**
|
|
@@ -5105,6 +5236,33 @@ export interface components {
|
|
|
5105
5236
|
/** Data */
|
|
5106
5237
|
data: components["schemas"]["CategoricalAnnotationConfig"] | components["schemas"]["ContinuousAnnotationConfig"] | components["schemas"]["FreeformAnnotationConfig"];
|
|
5107
5238
|
};
|
|
5239
|
+
/**
|
|
5240
|
+
* UpdateExperimentRequestBody
|
|
5241
|
+
* @description Fields to update on an experiment. Omit a field to leave it unchanged.
|
|
5242
|
+
*/
|
|
5243
|
+
UpdateExperimentRequestBody: {
|
|
5244
|
+
/**
|
|
5245
|
+
* Name
|
|
5246
|
+
* @description New name for the experiment (null is rejected; name is required)
|
|
5247
|
+
*/
|
|
5248
|
+
name?: string | null;
|
|
5249
|
+
/**
|
|
5250
|
+
* Description
|
|
5251
|
+
* @description New description for the experiment (null clears the description)
|
|
5252
|
+
*/
|
|
5253
|
+
description?: string | null;
|
|
5254
|
+
/**
|
|
5255
|
+
* Metadata
|
|
5256
|
+
* @description New metadata object for the experiment (replaces the existing metadata as a whole; null is rejected)
|
|
5257
|
+
*/
|
|
5258
|
+
metadata?: {
|
|
5259
|
+
[key: string]: unknown;
|
|
5260
|
+
} | null;
|
|
5261
|
+
};
|
|
5262
|
+
/** UpdateExperimentResponseBody */
|
|
5263
|
+
UpdateExperimentResponseBody: {
|
|
5264
|
+
data: components["schemas"]["Experiment"];
|
|
5265
|
+
};
|
|
5108
5266
|
/** UpdateProjectRequestBody */
|
|
5109
5267
|
UpdateProjectRequestBody: {
|
|
5110
5268
|
/** Description */
|
|
@@ -5255,6 +5413,12 @@ export interface components {
|
|
|
5255
5413
|
* @default false
|
|
5256
5414
|
*/
|
|
5257
5415
|
exportRemoteTraces?: boolean;
|
|
5416
|
+
/**
|
|
5417
|
+
* Attachuserid
|
|
5418
|
+
* @description When true and the request is authenticated as a PhoenixUser, attaches the user's email as the OpenInference ``user.id`` span attribute on all traced work for this request.
|
|
5419
|
+
* @default false
|
|
5420
|
+
*/
|
|
5421
|
+
attachUserId?: boolean;
|
|
5258
5422
|
/** Messages */
|
|
5259
5423
|
messages: components["schemas"]["UIMessage"][];
|
|
5260
5424
|
/** Model */
|
|
@@ -6577,6 +6741,59 @@ export interface operations {
|
|
|
6577
6741
|
};
|
|
6578
6742
|
};
|
|
6579
6743
|
};
|
|
6744
|
+
updateExperiment: {
|
|
6745
|
+
parameters: {
|
|
6746
|
+
query?: never;
|
|
6747
|
+
header?: never;
|
|
6748
|
+
path: {
|
|
6749
|
+
experiment_id: string;
|
|
6750
|
+
};
|
|
6751
|
+
cookie?: never;
|
|
6752
|
+
};
|
|
6753
|
+
requestBody: {
|
|
6754
|
+
content: {
|
|
6755
|
+
"application/json": components["schemas"]["UpdateExperimentRequestBody"];
|
|
6756
|
+
};
|
|
6757
|
+
};
|
|
6758
|
+
responses: {
|
|
6759
|
+
/** @description Experiment updated successfully */
|
|
6760
|
+
200: {
|
|
6761
|
+
headers: {
|
|
6762
|
+
[name: string]: unknown;
|
|
6763
|
+
};
|
|
6764
|
+
content: {
|
|
6765
|
+
"application/json": components["schemas"]["UpdateExperimentResponseBody"];
|
|
6766
|
+
};
|
|
6767
|
+
};
|
|
6768
|
+
/** @description Forbidden */
|
|
6769
|
+
403: {
|
|
6770
|
+
headers: {
|
|
6771
|
+
[name: string]: unknown;
|
|
6772
|
+
};
|
|
6773
|
+
content: {
|
|
6774
|
+
"text/plain": string;
|
|
6775
|
+
};
|
|
6776
|
+
};
|
|
6777
|
+
/** @description Experiment not found */
|
|
6778
|
+
404: {
|
|
6779
|
+
headers: {
|
|
6780
|
+
[name: string]: unknown;
|
|
6781
|
+
};
|
|
6782
|
+
content: {
|
|
6783
|
+
"text/plain": string;
|
|
6784
|
+
};
|
|
6785
|
+
};
|
|
6786
|
+
/** @description Invalid experiment ID or request body */
|
|
6787
|
+
422: {
|
|
6788
|
+
headers: {
|
|
6789
|
+
[name: string]: unknown;
|
|
6790
|
+
};
|
|
6791
|
+
content: {
|
|
6792
|
+
"text/plain": string;
|
|
6793
|
+
};
|
|
6794
|
+
};
|
|
6795
|
+
};
|
|
6796
|
+
};
|
|
6580
6797
|
getIncompleteExperimentRuns: {
|
|
6581
6798
|
parameters: {
|
|
6582
6799
|
query?: {
|
|
@@ -9087,6 +9304,41 @@ export interface operations {
|
|
|
9087
9304
|
};
|
|
9088
9305
|
};
|
|
9089
9306
|
};
|
|
9307
|
+
run_server_agent_agents_server_sessions__session_id__chat_post: {
|
|
9308
|
+
parameters: {
|
|
9309
|
+
query?: never;
|
|
9310
|
+
header?: never;
|
|
9311
|
+
path: {
|
|
9312
|
+
session_id: string;
|
|
9313
|
+
};
|
|
9314
|
+
cookie?: never;
|
|
9315
|
+
};
|
|
9316
|
+
requestBody: {
|
|
9317
|
+
content: {
|
|
9318
|
+
"application/json": components["schemas"]["ChatRequest"];
|
|
9319
|
+
};
|
|
9320
|
+
};
|
|
9321
|
+
responses: {
|
|
9322
|
+
/** @description Successful Response */
|
|
9323
|
+
200: {
|
|
9324
|
+
headers: {
|
|
9325
|
+
[name: string]: unknown;
|
|
9326
|
+
};
|
|
9327
|
+
content: {
|
|
9328
|
+
"application/json": unknown;
|
|
9329
|
+
};
|
|
9330
|
+
};
|
|
9331
|
+
/** @description Validation Error */
|
|
9332
|
+
422: {
|
|
9333
|
+
headers: {
|
|
9334
|
+
[name: string]: unknown;
|
|
9335
|
+
};
|
|
9336
|
+
content: {
|
|
9337
|
+
"application/json": components["schemas"]["HTTPValidationError"];
|
|
9338
|
+
};
|
|
9339
|
+
};
|
|
9340
|
+
};
|
|
9341
|
+
};
|
|
9090
9342
|
chat_agents__agent_id__sessions__session_id__chat_post: {
|
|
9091
9343
|
parameters: {
|
|
9092
9344
|
query?: never;
|