@arizeai/phoenix-client 2.3.3 → 2.3.5

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.
Files changed (90) hide show
  1. package/dist/esm/client.d.ts +3 -4
  2. package/dist/esm/client.d.ts.map +1 -1
  3. package/dist/esm/datasets/listDatasets.d.ts +1 -2
  4. package/dist/esm/datasets/listDatasets.d.ts.map +1 -1
  5. package/dist/esm/experiments/instrumention.d.ts.map +1 -1
  6. package/dist/esm/experiments/instrumention.js +11 -7
  7. package/dist/esm/experiments/instrumention.js.map +1 -1
  8. package/dist/esm/experiments/runExperiment.d.ts +18 -4
  9. package/dist/esm/experiments/runExperiment.d.ts.map +1 -1
  10. package/dist/esm/experiments/runExperiment.js +15 -5
  11. package/dist/esm/experiments/runExperiment.js.map +1 -1
  12. package/dist/esm/prompts/createPrompt.d.ts +9 -9
  13. package/dist/esm/prompts/createPrompt.d.ts.map +1 -1
  14. package/dist/esm/prompts/sdks/toSDK.d.ts +2 -3
  15. package/dist/esm/prompts/sdks/toSDK.d.ts.map +1 -1
  16. package/dist/esm/prompts/sdks/toSDK.js +1 -1
  17. package/dist/esm/prompts/sdks/toSDK.js.map +1 -1
  18. package/dist/esm/schemas/jsonLiteralSchema.d.ts +2 -3
  19. package/dist/esm/schemas/jsonLiteralSchema.d.ts.map +1 -1
  20. package/dist/esm/schemas/jsonLiteralSchema.js +6 -1
  21. package/dist/esm/schemas/jsonLiteralSchema.js.map +1 -1
  22. package/dist/esm/schemas/llm/converters.d.ts +9 -7
  23. package/dist/esm/schemas/llm/converters.d.ts.map +1 -1
  24. package/dist/esm/schemas/llm/converters.js +9 -7
  25. package/dist/esm/schemas/llm/converters.js.map +1 -1
  26. package/dist/esm/spans/addSpanAnnotation.d.ts +1 -2
  27. package/dist/esm/spans/addSpanAnnotation.d.ts.map +1 -1
  28. package/dist/esm/spans/getSpanAnnotations.d.ts +2 -3
  29. package/dist/esm/spans/getSpanAnnotations.d.ts.map +1 -1
  30. package/dist/esm/spans/getSpans.d.ts +2 -3
  31. package/dist/esm/spans/getSpans.d.ts.map +1 -1
  32. package/dist/esm/spans/logSpanAnnotations.d.ts +1 -2
  33. package/dist/esm/spans/logSpanAnnotations.d.ts.map +1 -1
  34. package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
  35. package/dist/esm/utils/urlUtils.d.ts +10 -7
  36. package/dist/esm/utils/urlUtils.d.ts.map +1 -1
  37. package/dist/esm/utils/urlUtils.js +10 -7
  38. package/dist/esm/utils/urlUtils.js.map +1 -1
  39. package/dist/src/client.d.ts +3 -4
  40. package/dist/src/client.d.ts.map +1 -1
  41. package/dist/src/datasets/listDatasets.d.ts +1 -2
  42. package/dist/src/datasets/listDatasets.d.ts.map +1 -1
  43. package/dist/src/experiments/instrumention.d.ts.map +1 -1
  44. package/dist/src/experiments/instrumention.js +11 -7
  45. package/dist/src/experiments/instrumention.js.map +1 -1
  46. package/dist/src/experiments/runExperiment.d.ts +18 -4
  47. package/dist/src/experiments/runExperiment.d.ts.map +1 -1
  48. package/dist/src/experiments/runExperiment.js +15 -5
  49. package/dist/src/experiments/runExperiment.js.map +1 -1
  50. package/dist/src/prompts/createPrompt.d.ts +9 -9
  51. package/dist/src/prompts/createPrompt.d.ts.map +1 -1
  52. package/dist/src/prompts/sdks/toSDK.d.ts +2 -3
  53. package/dist/src/prompts/sdks/toSDK.d.ts.map +1 -1
  54. package/dist/src/prompts/sdks/toSDK.js +5 -5
  55. package/dist/src/prompts/sdks/toSDK.js.map +1 -1
  56. package/dist/src/schemas/jsonLiteralSchema.d.ts +2 -3
  57. package/dist/src/schemas/jsonLiteralSchema.d.ts.map +1 -1
  58. package/dist/src/schemas/jsonLiteralSchema.js +8 -3
  59. package/dist/src/schemas/jsonLiteralSchema.js.map +1 -1
  60. package/dist/src/schemas/llm/converters.d.ts +9 -7
  61. package/dist/src/schemas/llm/converters.d.ts.map +1 -1
  62. package/dist/src/schemas/llm/converters.js +9 -7
  63. package/dist/src/schemas/llm/converters.js.map +1 -1
  64. package/dist/src/spans/addSpanAnnotation.d.ts +1 -2
  65. package/dist/src/spans/addSpanAnnotation.d.ts.map +1 -1
  66. package/dist/src/spans/getSpanAnnotations.d.ts +2 -3
  67. package/dist/src/spans/getSpanAnnotations.d.ts.map +1 -1
  68. package/dist/src/spans/getSpans.d.ts +2 -3
  69. package/dist/src/spans/getSpans.d.ts.map +1 -1
  70. package/dist/src/spans/logSpanAnnotations.d.ts +1 -2
  71. package/dist/src/spans/logSpanAnnotations.d.ts.map +1 -1
  72. package/dist/src/utils/urlUtils.d.ts +10 -7
  73. package/dist/src/utils/urlUtils.d.ts.map +1 -1
  74. package/dist/src/utils/urlUtils.js +10 -7
  75. package/dist/src/utils/urlUtils.js.map +1 -1
  76. package/dist/tsconfig.tsbuildinfo +1 -1
  77. package/package.json +15 -8
  78. package/src/client.ts +3 -3
  79. package/src/datasets/listDatasets.ts +1 -1
  80. package/src/experiments/instrumention.ts +7 -5
  81. package/src/experiments/runExperiment.ts +27 -3
  82. package/src/prompts/createPrompt.ts +9 -9
  83. package/src/prompts/sdks/toSDK.ts +5 -2
  84. package/src/schemas/jsonLiteralSchema.ts +7 -2
  85. package/src/schemas/llm/converters.ts +9 -7
  86. package/src/spans/addSpanAnnotation.ts +1 -1
  87. package/src/spans/getSpanAnnotations.ts +2 -2
  88. package/src/spans/getSpans.ts +2 -2
  89. package/src/spans/logSpanAnnotations.ts +1 -1
  90. package/src/utils/urlUtils.ts +10 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arizeai/phoenix-client",
3
- "version": "2.3.3",
3
+ "version": "2.3.5",
4
4
  "description": "A client for the Phoenix API",
5
5
  "main": "dist/src/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -40,8 +40,17 @@
40
40
  "src",
41
41
  "package.json"
42
42
  ],
43
- "keywords": [],
44
- "author": "",
43
+ "keywords": [
44
+ "phoenix",
45
+ "arize",
46
+ "llm",
47
+ "tracing",
48
+ "evaluation",
49
+ "prompts",
50
+ "datasets",
51
+ "experiments"
52
+ ],
53
+ "author": "oss@arize.com",
45
54
  "license": "ELv2",
46
55
  "devDependencies": {
47
56
  "@ai-sdk/openai": "^1.1.15",
@@ -52,15 +61,15 @@
52
61
  "openai": "^4.77.0",
53
62
  "openapi-typescript": "^7.6.1",
54
63
  "tsx": "^4.19.3",
55
- "typedoc": "^0.27.9",
56
64
  "vitest": "^2.1.9"
57
65
  },
58
66
  "dependencies": {
59
67
  "@arizeai/openinference-semantic-conventions": "^1.1.0",
68
+ "@arizeai/openinference-vercel": "^2.3.1",
60
69
  "@opentelemetry/api": "^1.9.0",
61
70
  "@opentelemetry/core": "^1.25.1",
62
- "@opentelemetry/instrumentation": "^0.57.2",
63
71
  "@opentelemetry/exporter-trace-otlp-proto": "^0.57.2",
72
+ "@opentelemetry/instrumentation": "^0.57.2",
64
73
  "@opentelemetry/resources": "^2.0.0",
65
74
  "@opentelemetry/sdk-trace-base": "^1.30.1",
66
75
  "@opentelemetry/sdk-trace-node": "^1.30.1",
@@ -85,8 +94,6 @@
85
94
  "build": "tsc --build tsconfig.json tsconfig.esm.json && tsc-alias -p tsconfig.esm.json",
86
95
  "postbuild": "echo '{\"type\": \"module\"}' > ./dist/esm/package.json && rimraf dist/test dist/examples",
87
96
  "type:check": "tsc --noEmit",
88
- "test": "vitest --typecheck",
89
- "docs": "typedoc",
90
- "docs:preview": "pnpx http-server ./docs -p 8080 -o"
97
+ "test": "vitest --typecheck"
91
98
  }
92
99
  }
package/src/client.ts CHANGED
@@ -9,9 +9,9 @@ import {
9
9
  makeDefaultClientOptions,
10
10
  } from "./config";
11
11
 
12
- type pathsV1 = oapiPathsV1;
13
- type componentsV1 = oapiComponentsV1;
14
- type operationsV1 = oapiOperationsV1;
12
+ export type pathsV1 = oapiPathsV1;
13
+ export type componentsV1 = oapiComponentsV1;
14
+ export type operationsV1 = oapiOperationsV1;
15
15
 
16
16
  /**
17
17
  * Generated openapi types for the Phoenix client, by API version.
@@ -5,7 +5,7 @@ import invariant from "tiny-invariant";
5
5
 
6
6
  export type ListDatasetsParams = ClientFn;
7
7
 
8
- type FullDatasetInfo = DatasetInfo & {
8
+ export type FullDatasetInfo = DatasetInfo & {
9
9
  startDate: Date;
10
10
  endDate: Date;
11
11
  };
@@ -1,10 +1,10 @@
1
1
  import { diag, DiagConsoleLogger, DiagLogLevel } from "@opentelemetry/api";
2
2
  import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-proto";
3
3
  import { resourceFromAttributes } from "@opentelemetry/resources";
4
- import { SimpleSpanProcessor } from "@opentelemetry/sdk-trace-base";
5
4
  import { NodeTracerProvider } from "@opentelemetry/sdk-trace-node";
6
5
  import { SEMRESATTRS_PROJECT_NAME } from "@arizeai/openinference-semantic-conventions";
7
6
  import { HeadersOptions } from "openapi-fetch";
7
+ import { OpenInferenceSimpleSpanProcessor } from "@arizeai/openinference-vercel";
8
8
 
9
9
  /**
10
10
  * Creates a provider that exports traces to Phoenix.
@@ -28,14 +28,16 @@ export function createProvider({
28
28
  [SEMRESATTRS_PROJECT_NAME]: projectName,
29
29
  }),
30
30
  spanProcessors: [
31
- new SimpleSpanProcessor(
32
- new OTLPTraceExporter({
31
+ // We opt to use the OpenInferenceSimpleSpanProcessor instead of the SimpleSpanProcessor
32
+ // Since so many AI applications use the AI SDK
33
+ new OpenInferenceSimpleSpanProcessor({
34
+ exporter: new OTLPTraceExporter({
33
35
  url: `${baseUrl}/v1/traces`,
34
36
  headers: Array.isArray(headers)
35
37
  ? Object.fromEntries(headers)
36
38
  : headers,
37
- })
38
- ),
39
+ }),
40
+ }),
39
41
  ],
40
42
  });
41
43
 
@@ -87,6 +87,13 @@ export type RunExperimentParams = ClientFn & {
87
87
  * @default false
88
88
  */
89
89
  dryRun?: number | boolean;
90
+ /**
91
+ * Whether to set the global tracer provider when running the task.
92
+ * If set to false, a locally scoped tracer will be created but will not get registered.
93
+ * This may cause certain spans to not be picked up by Phoenix. Notably libraries like the AI SDK that leverage the global tracer.
94
+ * @default true
95
+ */
96
+ setGlobalTracerProvider?: boolean;
90
97
  };
91
98
 
92
99
  /**
@@ -133,6 +140,7 @@ export async function runExperiment({
133
140
  record = true,
134
141
  concurrency = 5,
135
142
  dryRun = false,
143
+ setGlobalTracerProvider = true,
136
144
  }: RunExperimentParams): Promise<RanExperiment> {
137
145
  let provider: NodeTracerProvider | undefined;
138
146
  const isDryRun = typeof dryRun === "number" || dryRun === true;
@@ -194,6 +202,10 @@ export async function runExperiment({
194
202
  baseUrl,
195
203
  headers: client.config.headers ?? {},
196
204
  });
205
+ // Register the provider
206
+ if (setGlobalTracerProvider) {
207
+ provider.register();
208
+ }
197
209
  taskTracer = provider.getTracer(projectName);
198
210
  }
199
211
  if (!record) {
@@ -263,6 +275,7 @@ export async function runExperiment({
263
275
  logger,
264
276
  concurrency,
265
277
  dryRun,
278
+ setGlobalTracerProvider,
266
279
  });
267
280
  ranExperiment.evaluationRuns = evaluationRuns;
268
281
 
@@ -407,6 +420,7 @@ export async function evaluateExperiment({
407
420
  logger = console,
408
421
  concurrency = 5,
409
422
  dryRun = false,
423
+ setGlobalTracerProvider = true,
410
424
  }: {
411
425
  /**
412
426
  * The experiment to evaluate
@@ -426,6 +440,11 @@ export async function evaluateExperiment({
426
440
  * @default false
427
441
  * */
428
442
  dryRun?: boolean | number;
443
+ /**
444
+ * Whether to set the global tracer provider when running the evaluators
445
+ * @default true
446
+ */
447
+ setGlobalTracerProvider?: boolean;
429
448
  }): Promise<RanExperiment> {
430
449
  const isDryRun = typeof dryRun === "number" || dryRun === true;
431
450
  const client = _client ?? createClient();
@@ -441,6 +460,9 @@ export async function evaluateExperiment({
441
460
  baseUrl,
442
461
  headers: client.config.headers ?? {},
443
462
  });
463
+ if (setGlobalTracerProvider) {
464
+ provider.register();
465
+ }
444
466
  } else {
445
467
  provider = createNoOpProvider();
446
468
  }
@@ -449,7 +471,7 @@ export async function evaluateExperiment({
449
471
  : provider.getTracer("evaluators");
450
472
  const nRuns =
451
473
  typeof dryRun === "number"
452
- ? Math.max(dryRun, Object.keys(experiment.runs).length)
474
+ ? Math.min(dryRun, Object.keys(experiment.runs).length)
453
475
  : Object.keys(experiment.runs).length;
454
476
  const dataset = await getDataset({
455
477
  dataset: { datasetId: experiment.datasetId },
@@ -662,8 +684,10 @@ async function runEvaluator({
662
684
  *
663
685
  * @experimental This feature is not complete, and will change in the future.
664
686
  *
665
- * @param name - The name of the evaluator.
666
- * @param evaluate - The evaluator function.
687
+ * @param params - The parameters for creating the evaluator
688
+ * @param params.name - The name of the evaluator.
689
+ * @param params.kind - The kind of evaluator (e.g., "CODE", "LLM")
690
+ * @param params.evaluate - The evaluator function.
667
691
  * @returns The evaluator object.
668
692
  */
669
693
  export function asEvaluator({
@@ -82,17 +82,17 @@ interface PromptVersionInputBase {
82
82
  templateFormat?: PromptVersionData["template_format"];
83
83
  }
84
84
 
85
- interface OpenAIPromptVersionInput extends PromptVersionInputBase {
85
+ export interface OpenAIPromptVersionInput extends PromptVersionInputBase {
86
86
  modelProvider: "OPENAI";
87
87
  invocationParameters?: OpenAIInvocationParameters;
88
88
  }
89
89
 
90
- interface AzureOpenAIPromptVersionInput extends PromptVersionInputBase {
90
+ export interface AzureOpenAIPromptVersionInput extends PromptVersionInputBase {
91
91
  modelProvider: "AZURE_OPENAI";
92
92
  invocationParameters?: AzureOpenAIInvocationParameters;
93
93
  }
94
94
 
95
- interface AnthropicPromptVersionInput extends PromptVersionInputBase {
95
+ export interface AnthropicPromptVersionInput extends PromptVersionInputBase {
96
96
  modelProvider: "ANTHROPIC";
97
97
  /**
98
98
  * The invocation parameters for the prompt version.
@@ -101,32 +101,32 @@ interface AnthropicPromptVersionInput extends PromptVersionInputBase {
101
101
  invocationParameters: AnthropicInvocationParameters;
102
102
  }
103
103
 
104
- interface GooglePromptVersionInput extends PromptVersionInputBase {
104
+ export interface GooglePromptVersionInput extends PromptVersionInputBase {
105
105
  modelProvider: "GOOGLE";
106
106
  invocationParameters?: GoogleInvocationParameters;
107
107
  }
108
108
 
109
- interface DeepSeekPromptVersionInput extends PromptVersionInputBase {
109
+ export interface DeepSeekPromptVersionInput extends PromptVersionInputBase {
110
110
  modelProvider: "DEEPSEEK";
111
111
  invocationParameters?: DeepSeekInvocationParameters;
112
112
  }
113
113
 
114
- interface XAIPromptVersionInput extends PromptVersionInputBase {
114
+ export interface XAIPromptVersionInput extends PromptVersionInputBase {
115
115
  modelProvider: "XAI";
116
116
  invocationParameters?: XAIInvocationParameters;
117
117
  }
118
118
 
119
- interface OllamaPromptVersionInput extends PromptVersionInputBase {
119
+ export interface OllamaPromptVersionInput extends PromptVersionInputBase {
120
120
  modelProvider: "OLLAMA";
121
121
  invocationParameters?: OllamaInvocationParameters;
122
122
  }
123
123
 
124
- interface AwsPromptVersionInput extends PromptVersionInputBase {
124
+ export interface AwsPromptVersionInput extends PromptVersionInputBase {
125
125
  modelProvider: "AWS";
126
126
  invocationParameters?: AwsInvocationParameters;
127
127
  }
128
128
 
129
- type PromptVersionInput =
129
+ export type PromptVersionInput =
130
130
  | OpenAIPromptVersionInput
131
131
  | AzureOpenAIPromptVersionInput
132
132
  | AnthropicPromptVersionInput
@@ -23,7 +23,7 @@ export type SDKParams<T extends SupportedSDK> = Parameters<
23
23
  /**
24
24
  * Map of SDK names to their corresponding conversion functions
25
25
  */
26
- const PROVIDER_TO_SDK = {
26
+ export const PROVIDER_TO_SDK = {
27
27
  openai: toOpenAI,
28
28
  anthropic: toAnthropic,
29
29
  ai: toAI,
@@ -48,7 +48,10 @@ const getTargetSDK = <T extends SupportedSDK>(sdk: T) => {
48
48
  /**
49
49
  * Parameters specific to the toSDK function
50
50
  */
51
- type ToSDKParams<T extends SupportedSDK, V extends Variables = Variables> = {
51
+ export type ToSDKParams<
52
+ T extends SupportedSDK,
53
+ V extends Variables = Variables,
54
+ > = {
52
55
  /**
53
56
  * String representing the SDK to convert to
54
57
  */
@@ -4,8 +4,13 @@ import z from "zod";
4
4
  * The zod schema for JSON literal primitives
5
5
  * @see {@link https://zod.dev/?id=json-type|Zod Documentation}
6
6
  */
7
- const literalSchema = z.union([z.string(), z.number(), z.boolean(), z.null()]);
8
- type Literal = z.infer<typeof literalSchema>;
7
+ export const literalSchema = z.union([
8
+ z.string(),
9
+ z.number(),
10
+ z.boolean(),
11
+ z.null(),
12
+ ]);
13
+ export type Literal = z.infer<typeof literalSchema>;
9
14
  export type JSONLiteral =
10
15
  | Literal
11
16
  | { [key: string]: JSONLiteral }
@@ -211,7 +211,7 @@ export const fromOpenAIMessage = <
211
211
 
212
212
  /**
213
213
  * Converts a tool call to the OpenAI format if possible
214
- * @param toolCall a tool call from an unknown LlmProvider
214
+ * @param maybeToolCall a tool call from an unknown LlmProvider
215
215
  * @returns the tool call parsed to the OpenAI format
216
216
  */
217
217
  export const toOpenAIToolCall = (
@@ -243,8 +243,9 @@ export const toOpenAIToolCall = (
243
243
 
244
244
  /**
245
245
  * Converts a tool call to a target provider format
246
- * @param toolCall the tool call to convert
247
- * @param targetProvider the provider to convert the tool call to
246
+ * @param params the parameters object
247
+ * @param params.toolCall the tool call to convert
248
+ * @param params.targetProvider the provider to convert the tool call to
248
249
  * @returns the tool call in the target provider format
249
250
  */
250
251
  export const fromOpenAIToolCall = <
@@ -316,10 +317,11 @@ export const toOpenAIToolChoice = (
316
317
  };
317
318
 
318
319
  /**
319
- * Converts a tool call to a target provider format
320
- * @param toolCall the tool call to convert
321
- * @param targetProvider the provider to convert the tool call to
322
- * @returns the tool call in the target provider format
320
+ * Converts a tool choice to a target provider format
321
+ * @param params the parameters object
322
+ * @param params.toolChoice the tool choice to convert
323
+ * @param params.targetProvider the provider to convert the tool choice to
324
+ * @returns the tool choice in the target provider format
323
325
  */
324
326
  export const fromOpenAIToolChoice = <
325
327
  TargetProviderSDK extends NonNullable<PromptSDKFormat>,
@@ -5,7 +5,7 @@ import { SpanAnnotation, toSpanAnnotationData } from "./types";
5
5
  /**
6
6
  * Parameters to add a span annotation
7
7
  */
8
- interface AddSpanAnnotationParams extends ClientFn {
8
+ export interface AddSpanAnnotationParams extends ClientFn {
9
9
  spanAnnotation: SpanAnnotation;
10
10
  }
11
11
 
@@ -6,7 +6,7 @@ import { ProjectSelector } from "../types/projects";
6
6
  /**
7
7
  * Parameters to get span annotations from a project using auto-generated types
8
8
  */
9
- interface GetSpanAnnotationsParams extends ClientFn {
9
+ export interface GetSpanAnnotationsParams extends ClientFn {
10
10
  /** The project to get span annotations from */
11
11
  project: ProjectSelector;
12
12
  /** One or more span IDs to fetch annotations for */
@@ -21,7 +21,7 @@ interface GetSpanAnnotationsParams extends ClientFn {
21
21
  limit?: number;
22
22
  }
23
23
 
24
- type GetSpanAnnotationsResponse =
24
+ export type GetSpanAnnotationsResponse =
25
25
  operations["listSpanAnnotationsBySpanIds"]["responses"]["200"];
26
26
 
27
27
  export type GetSpanAnnotationsResult = {
@@ -6,7 +6,7 @@ import { ProjectSelector } from "../types/projects";
6
6
  /**
7
7
  * Parameters to get spans from a project using auto-generated types
8
8
  */
9
- interface GetSpansParams extends ClientFn {
9
+ export interface GetSpansParams extends ClientFn {
10
10
  /** The project to get spans from */
11
11
  project: ProjectSelector;
12
12
  /** Inclusive lower bound time. Must be a valid ISO 8601 string or Date object. */
@@ -19,7 +19,7 @@ interface GetSpansParams extends ClientFn {
19
19
  limit?: number;
20
20
  }
21
21
 
22
- type GetSpansResponse = operations["getSpans"]["responses"]["200"];
22
+ export type GetSpansResponse = operations["getSpans"]["responses"]["200"];
23
23
 
24
24
  export type GetSpansResult = {
25
25
  spans: GetSpansResponse["content"]["application/json"]["data"];
@@ -5,7 +5,7 @@ import { SpanAnnotation, toSpanAnnotationData } from "./types";
5
5
  /**
6
6
  * Parameters to log multiple span annotations
7
7
  */
8
- interface LogSpanAnnotationsParams extends ClientFn {
8
+ export interface LogSpanAnnotationsParams extends ClientFn {
9
9
  /**
10
10
  * The span annotations to log
11
11
  */
@@ -13,9 +13,10 @@ function getWebBaseUrl(baseUrl: string): string {
13
13
 
14
14
  /**
15
15
  * Get the URL to view a specific experiment in the Phoenix web UI
16
- * @param baseUrl The base URL of the Phoenix API
17
- * @param datasetId The ID of the dataset
18
- * @param experimentId The ID of the experiment
16
+ * @param params - The parameters for generating the experiment URL
17
+ * @param params.baseUrl - The base URL of the Phoenix API
18
+ * @param params.datasetId - The ID of the dataset
19
+ * @param params.experimentId - The ID of the experiment
19
20
  * @returns The URL to view the experiment
20
21
  */
21
22
  export function getExperimentUrl({
@@ -32,8 +33,9 @@ export function getExperimentUrl({
32
33
 
33
34
  /**
34
35
  * Get the URL to view experiments for a dataset in the Phoenix web UI
35
- * @param baseUrl The base URL of the Phoenix API
36
- * @param datasetId The ID of the dataset
36
+ * @param params - The parameters for generating the dataset experiments URL
37
+ * @param params.baseUrl - The base URL of the Phoenix API
38
+ * @param params.datasetId - The ID of the dataset
37
39
  * @returns The URL to view dataset experiments
38
40
  */
39
41
  export function getDatasetExperimentsUrl({
@@ -48,8 +50,9 @@ export function getDatasetExperimentsUrl({
48
50
 
49
51
  /**
50
52
  * Get the URL to view a dataset in the Phoenix web UI
51
- * @param baseUrl The base URL of the Phoenix API
52
- * @param datasetId The ID of the dataset
53
+ * @param params - The parameters for generating the dataset URL
54
+ * @param params.baseUrl - The base URL of the Phoenix API
55
+ * @param params.datasetId - The ID of the dataset
53
56
  * @returns The URL to view the dataset
54
57
  */
55
58
  export function getDatasetUrl({