Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.galileo.ai/llms.txt

Use this file to discover all available pages before exploring further.


Class: GalileoApiClient

Defined in: src/api-client/galileo-client.ts

Extends

  • BaseClient

Constructors

Constructor

new GalileoApiClient(): GalileoApiClient;

Returns

GalileoApiClient

Inherited from

BaseClient.constructor;

Properties

client

protected client: undefined | Client<paths, `${string}/${string}`> = undefined;
Defined in: src/api-client/base-client.ts

Inherited from

BaseClient.client;

datasetId

datasetId: string = "";
Defined in: src/api-client/galileo-client.ts

experimentId

experimentId: string = "";
Defined in: src/api-client/galileo-client.ts

logStreamId

logStreamId: string = "";
Defined in: src/api-client/galileo-client.ts

projectId

projectId: string = "";
Defined in: src/api-client/galileo-client.ts

projectScoped

projectScoped: boolean = true;
Defined in: src/api-client/galileo-client.ts

projectType

projectType: "prompt_evaluation" | "llm_monitor" | "gen_ai" | "protect" = ProjectTypes.genAI;
Defined in: src/api-client/galileo-client.ts

runId

runId: string = "";
Defined in: src/api-client/galileo-client.ts

sessionId?

optional sessionId: string = undefined;
Defined in: src/api-client/galileo-client.ts

token

protected token: string = '';
Defined in: src/api-client/base-client.ts

Inherited from

BaseClient.token;

timestampRecord

static timestampRecord: number = 0;
Defined in: src/api-client/galileo-client.ts

Accessors

apiUrl

Get Signature

get protected apiUrl(): string;
Defined in: src/api-client/base-client.ts
Returns
string

Set Signature

set protected apiUrl(url: string): void;
Defined in: src/api-client/base-client.ts
Parameters
url
string
Returns
void

Inherited from

BaseClient.apiUrl;

Methods

appendRowsToDatasetContent()

appendRowsToDatasetContent(
   datasetId: string,
   etag: string,
rows: DatasetAppendRow[]): Promise<void>;
Defined in: src/api-client/galileo-client.ts Appends rows to the content of a dataset.

Parameters

datasetId
string The ID of the dataset.
etag
string The ETag used for optimistic concurrency control.
rows
DatasetAppendRow[] The rows to append to the dataset content.

Returns

Promise<void> A promise that resolves when the rows have been appended.

convertToCamelCase()

convertToCamelCase<T, TTarget>(obj: T): ValidatedCamelCase<T, TTarget>;
Defined in: src/api-client/base-client.ts

Type Parameters

T
T extends object
TTarget
TTarget

Parameters

obj
T

Returns

ValidatedCamelCase<T, TTarget>

Inherited from

BaseClient.convertToCamelCase;

convertToSnakeCase()

convertToSnakeCase<T, TTarget>(obj: T): ValidatedSnakeCase<T, TTarget>;
Defined in: src/api-client/base-client.ts

Type Parameters

T
T extends object
TTarget
TTarget

Parameters

obj
T

Returns

ValidatedSnakeCase<T, TTarget>

Inherited from

BaseClient.convertToSnakeCase;

countSessions()

countSessions(options: LogRecordsQueryCountRequest): Promise<LogRecordsQueryCountResponse>;
Defined in: src/api-client/galileo-client.ts Count the number of sessions matching the provided query criteria.

Parameters

options
LogRecordsQueryCountRequest Count request object

Returns

Promise<LogRecordsQueryCountResponse> Promise resolving to a response containing the total count

countSpans()

countSpans(options: LogRecordsQueryCountRequest): Promise<LogRecordsQueryCountResponse>;
Defined in: src/api-client/galileo-client.ts Count the number of spans matching the provided query criteria.

Parameters

options
LogRecordsQueryCountRequest Count request object

Returns

Promise<LogRecordsQueryCountResponse> Promise resolving to a response containing the total count

countTraces()

countTraces(options: LogRecordsQueryCountRequest): Promise<LogRecordsQueryCountResponse>;
Defined in: src/api-client/galileo-client.ts Count the number of traces matching the provided query criteria.

Parameters

options
LogRecordsQueryCountRequest Count request object

Returns

Promise<LogRecordsQueryCountResponse> Promise resolving to a response containing the total count

createCodeScorerVersion()

createCodeScorerVersion(
   scorerId: string,
   codeContent: string,
validationResult?: string): Promise<BaseScorerVersionResponse>;
Defined in: src/api-client/galileo-client.ts Creates a code-based scorer version.

Parameters

scorerId
string The unique identifier of the scorer.
codeContent
string The Python code content for the scorer.
validationResult?
string (Optional) The validation result JSON string.

Returns

Promise<BaseScorerVersionResponse> A promise that resolves to the created scorer version.

createDataset()

Call Signature

createDataset(
   name: string,
   filePath: string,
format: DatasetFormat): Promise<any>;
Defined in: src/api-client/galileo-client.ts Creates a new dataset with a name, file path, and format.
Parameters
name
string The name of the dataset.
filePath
string The path to the dataset file.
format
DatasetFormat The format of the dataset file.
Returns
Promise<any> A promise that resolves to the created dataset.

Call Signature

createDataset(params: object): Promise<any>;
Defined in: src/api-client/galileo-client.ts Creates a new dataset from an options object.
Parameters
params
The options used to create the dataset.
filePath
string The path to the dataset file.
format
DatasetFormat The format of the dataset file.
name
string The name of the dataset.
projectId?
string (Optional) The ID of the project that will use the dataset.
Returns
Promise<any> A promise that resolves to the created dataset.

createExperiment()

createExperiment(name: string, dataset?:
  | null
| ExperimentDatasetRequest): Promise<ExperimentResponseType>;
Defined in: src/api-client/galileo-client.ts

Parameters

name
string
dataset?
null | ExperimentDatasetRequest

Returns

Promise<ExperimentResponseType>

createGlobalPromptTemplate()

createGlobalPromptTemplate(
   template: object[],
   name: string,
options?: object): Promise<PromptTemplate>;
Defined in: src/api-client/galileo-client.ts Creates a global prompt template, optionally resolving a project by ID or name. If both projectId and projectName are provided, an error will be thrown. Only one of these parameters should be specified.

Parameters

template
object[] Template messages stored in the template.
name
string Name assigned to the template.
options?
(Optional) Project scoping information.
projectId?
null | string (Optional) Project ID to associate with the template.
projectName?
string (Optional) Project name to resolve to an ID.

Returns

Promise<PromptTemplate> A promise that resolves to the created template payload.

createJob()

createJob(options: object): Promise<CreateJobResponse>;
Defined in: src/api-client/galileo-client.ts

Parameters

options
datasetId
string
name
string
projectId
string
promptSettings
PromptRunSettings
promptTemplateId
string
runId
string
scorers?
ScorerConfig[]
taskType
TaskType

Returns

Promise<CreateJobResponse>

createLlmScorerVersion()

Call Signature

createLlmScorerVersion(scorerId: string, options: object): Promise<BaseScorerVersionResponse>;
Defined in: src/api-client/galileo-client.ts Creates a new LLM scorer version.
Parameters
scorerId
string The unique identifier of the scorer.
options
The LLM scorer version creation options.
chainPollTemplate?
{ explanation_field_name?: string; metric_description?: null | string; metric_few_shot_examples?: object[]; metric_system_prompt?: null | string; response_schema?: | null | { [key: string]: unknown; }; template: string; value_field_name?: string; } (Optional) Chain poll template configuration.
chainPollTemplate.explanation_field_name?
string Explanation Field Name Description Field name to look for in the chainpoll response, for the explanation. Default
explanation;
chainPollTemplate.metric_description?
null | string Metric Description Description Description of what the metric should do.
chainPollTemplate.metric_few_shot_examples?
object[] Metric Few Shot Examples Description Few-shot examples for the metric.
chainPollTemplate.metric_system_prompt?
null | string Metric System Prompt Description System prompt for the metric.
chainPollTemplate.response_schema?
| null | { [key: string]: unknown; } Response Schema Description Response schema for the output
chainPollTemplate.template
string Template Description Chainpoll prompt template.
chainPollTemplate.value_field_name?
string Value Field Name Description Field name to look for in the chainpoll response, for the rating. Default
rating;
cotEnabled?
boolean (Optional) Whether chain-of-thought is enabled.
instructions?
string (Optional) Instructions for the LLM scorer.
modelName?
string (Optional) The model name to use.
numJudges?
number (Optional) The number of judges for consensus.
userPrompt?
string (Optional) User prompt for the LLM scorer.
Returns
Promise<BaseScorerVersionResponse> A promise that resolves to the created scorer version.

Call Signature

createLlmScorerVersion(
   scorerId: string,
   instructions?: string,
   chainPollTemplate?: object,
   userPrompt?: string,
   cotEnabled?: boolean,
   modelName?: string,
numJudges?: number): Promise<BaseScorerVersionResponse>;
Defined in: src/api-client/galileo-client.ts Creates a new LLM scorer version.
Parameters
scorerId
string The unique identifier of the scorer.
instructions?
string (Optional) Instructions for the LLM scorer.
chainPollTemplate?
(Optional) Chain poll template configuration.
explanation_field_name?
string Explanation Field Name Description Field name to look for in the chainpoll response, for the explanation. Default
explanation;
metric_description?
null | string Metric Description Description Description of what the metric should do.
metric_few_shot_examples?
object[] Metric Few Shot Examples Description Few-shot examples for the metric.
metric_system_prompt?
null | string Metric System Prompt Description System prompt for the metric.
response_schema?
| null | { [key: string]: unknown; } Response Schema Description Response schema for the output
template
string Template Description Chainpoll prompt template.
value_field_name?
string Value Field Name Description Field name to look for in the chainpoll response, for the rating. Default
rating;
userPrompt?
string (Optional) User prompt for the LLM scorer.
cotEnabled?
boolean (Optional) Whether chain-of-thought is enabled.
modelName?
string (Optional) The model name to use.
numJudges?
number (Optional) The number of judges for consensus.
Returns
Promise<BaseScorerVersionResponse> A promise that resolves to the created scorer version.

createLogStream()

createLogStream(name: string): Promise<LogStreamType>;
Defined in: src/api-client/galileo-client.ts Creates a new log stream.

Parameters

name
string The name of the log stream to create.

Returns

Promise<LogStreamType> A promise that resolves to the created log stream.

createLogStreamScorerSettings()

createLogStreamScorerSettings(logStreamId: string, scorers: ScorerConfig[]): Promise<void>;
Defined in: src/api-client/galileo-client.ts Creates scorer settings for a log stream.

Parameters

logStreamId
string The ID of the log stream to configure scorers for.
scorers
ScorerConfig[] Array of scorer configurations to apply.

Returns

Promise<void> A promise that resolves when the scorer settings are created.

createProject()

createProject(name: string, options?: ProjectCreateOptions): Promise<{
  createdAt: string;
  createdBy?: null | string;
  id: string;
  name?: null | string;
  type?: null | "prompt_evaluation" | "llm_monitor" | "gen_ai" | "protect";
  updatedAt: string;
}>;
Defined in: src/api-client/galileo-client.ts Creates a new project.

Parameters

name
string Name of the project to create.
options?
ProjectCreateOptions (Optional) Additional project creation parameters.

Returns

Promise<{ createdAt: string; createdBy?: null | string; id: string; name?: null | string; type?: null | "prompt_evaluation" | "llm_monitor" | "gen_ai" | "protect"; updatedAt: string; }> A promise that resolves to the created project payload.

createPromptRunJob()

createPromptRunJob(
   experimentId: string,
   projectId: string,
   promptTemplateVersionId: string,
   datasetId: string,
   scorers?: ScorerConfig[],
promptSettings?: PromptRunSettings): Promise<CreateJobResponse>;
Defined in: src/api-client/galileo-client.ts

Parameters

experimentId
string
projectId
string
promptTemplateVersionId
string
datasetId
string
scorers?
ScorerConfig[]
promptSettings?
PromptRunSettings

Returns

Promise<CreateJobResponse>

createPromptTemplate()

createPromptTemplate(template: object[], name: string): Promise<PromptTemplate>;
Defined in: src/api-client/galileo-client.ts Creates a new prompt template scoped to the initialized project. Creates a project-scoped prompt template that is associated with the project the client was initialized with. For global templates (which can be shared across projects but can optionally be associated with a project), use createGlobalPromptTemplate() instead, which accepts optional projectId or projectName parameters.

Parameters

template
object[] An array of Message objects representing the template content. Each message should have a role (e.g., ‘user’, ‘system’, ‘assistant’) and content.
name
string A unique name to assign to the template within the project. The name should be descriptive and follow your naming conventions.

Returns

Promise<PromptTemplate> A promise that resolves to the created prompt template payload, including the assigned ID, version information, and metadata.

Throws

Error if a template with the same name already exists in the project, if the client is not initialized with a project, if the service is unavailable, or if the template data is invalid.

createRunScorerSettings()

createRunScorerSettings(
   experimentId: string,
   projectId: string,
scorers: ScorerConfig[]): Promise<void>;
Defined in: src/api-client/galileo-client.ts Creates run scorer settings (backward compatibility method).

Parameters

experimentId
string The experiment ID (used as runId).
projectId
string The unique identifier of the project.
scorers
ScorerConfig[] The list of scorer configurations to apply.

Returns

Promise<void> A promise that resolves when the settings are created.

Deprecated

Use updateRunScorerSettings instead for new code.

createScorer()

Call Signature

createScorer(options: createScorerOptions): Promise<ScorerResponse>;
Defined in: src/api-client/galileo-client.ts Creates a new scorer.
Parameters
options
createScorerOptions The scorer creation options.
Returns
Promise<ScorerResponse> A promise that resolves to the created scorer.

Call Signature

createScorer(
   name: string,
   scorerType: ScorerTypes,
   description?: string,
   tags?: string[],
   defaults?: object,
   modelType?: "llm" | "code" | "slm",
   defaultVersionId?: string,
   scoreableNodeTypes?: (
  | "agent"
  | "llm"
  | "retriever"
  | "tool"
  | "workflow"
  | "control"
  | "trace"
  | "session")[],
   outputType?: OutputType,
inputType?: InputType): Promise<ScorerResponse>;
Defined in: src/api-client/galileo-client.ts Creates a new scorer.
Parameters
name
string The name of the scorer.
scorerType
ScorerTypes The type of the scorer.
description?
string (Optional) A description for the scorer.
tags?
string[] (Optional) Tags to associate with the scorer.
defaults?
(Optional) Default settings for the scorer. Required for LLM scorers.
cot_enabled?
null | boolean Cot Enabled Description Whether to enable chain of thought for this scorer. Defaults to False for llm scorers.
filters?
| null | ( | { case_sensitive?: boolean; name: "node_name"; operator: "eq" | "one_of" | "ne" | "contains" | "not_in"; value: string | string[]; } | { key: string; name: "metadata"; operator: "eq" | "one_of" | "ne" | "not_in"; value: string | string[]; } | { name: "modality"; operator: "eq" | "one_of" | "ne" | "not_in"; value: string | string[]; })[] Filters Description List of filters to apply to the scorer.
input_type?
| null | "basic" | "llm_spans" | "retriever_spans" | "sessions_normalized" | "sessions_trace_io_only" | "tool_spans" | "trace_input_only" | "trace_io_only" | "trace_normalized" | "trace_output_only" | "agent_spans" | "workflow_spans" Description What type of input to use for model-based scorers (sessions_normalized, trace_io_only, etc..).
model_name?
null | string Model Name
num_judges?
null | number Num Judges
output_type?
| null | "boolean" | "categorical" | "count" | "discrete" | "freeform" | "percentage" | "multilabel" | "retrieved_chunk_list_boolean" | "boolean_multilabel" Description What type of output to use for model-based scorers (boolean, categorical, etc.).
scoreable_node_types?
null | string[] Scoreable Node Types Description List of node types that can be scored by this scorer. Defaults to llm/chat.
modelType?
(Optional) The model type for the scorer. "llm" | "code" | "slm"
defaultVersionId?
string (Optional) The default version ID for the scorer.
scoreableNodeTypes?
( | "agent" | "llm" | "retriever" | "tool" | "workflow" | "control" | "trace" | "session")[] (Optional) The node types that can be scored.
outputType?
OutputType (Optional) The output type for the scorer.
inputType?
InputType (Optional) The input type for the scorer.
Returns
Promise<ScorerResponse> A promise that resolves to the created scorer.

createSessionLegacy()

createSessionLegacy(__namedParameters: object): Promise<SessionCreateResponse>;
Defined in: src/api-client/galileo-client.ts

Parameters

__namedParameters
externalId?
string
metadata?
Record<string, string>
name?
string
previousSessionId?
string

Returns

Promise<SessionCreateResponse>

createUserProjectCollaborators()

createUserProjectCollaborators(collaborators: object[], projectId?: string): Promise<object[]>;
Defined in: src/api-client/galileo-client.ts Creates user collaborators for a project.

Parameters

collaborators
object[] Collaborator payloads to create.
projectId?
string (Optional) Project ID override when not using a scoped client.

Returns

Promise<object[]> A promise that resolves to the created collaborators.

deleteDataset()

deleteDataset(datasetId: string): Promise<void>;
Defined in: src/api-client/galileo-client.ts Deletes a dataset by ID.

Parameters

datasetId
string The ID of the dataset to delete.

Returns

Promise<void> A promise that resolves when the dataset has been deleted.

deleteExperiment()

deleteExperiment(id: string): Promise<void>;
Defined in: src/api-client/galileo-client.ts Deletes an experiment.

Parameters

id
string The unique identifier of the experiment.

Returns

Promise<void> A promise that resolves when the experiment is deleted.

deleteExperimentTag()

deleteExperimentTag(experimentId: string, tagId: string): Promise<void>;
Defined in: src/api-client/galileo-client.ts Deletes a tag for a specific experiment.

Parameters

experimentId
string The unique identifier of the experiment.
tagId
string The unique identifier of the tag to delete.

Returns

Promise<void> A promise that resolves when the tag is deleted.

deleteGlobalPromptTemplate()

deleteGlobalPromptTemplate(id: string): Promise<void>;
Defined in: src/api-client/galileo-client.ts Deletes a global prompt template by ID.

Parameters

id
string Template identifier to delete.

Returns

Promise<void> A promise that resolves when the template is removed.

deleteProject()

deleteProject(projectId: string): Promise<{
  message: string;
}>;
Defined in: src/api-client/galileo-client.ts Deletes a project by ID.

Parameters

projectId
string ID of the project to delete.

Returns

Promise<{ message: string; }> A promise that resolves to the delete response payload.

deleteScorer()

deleteScorer(scorerId: string): Promise<DeleteScorerResponse>;
Defined in: src/api-client/galileo-client.ts Deletes a scorer by its unique identifier.

Parameters

scorerId
string The unique identifier of the scorer to delete.

Returns

Promise<DeleteScorerResponse> A promise that resolves to a response containing a success message.

deleteSessions()

deleteSessions(options: LogRecordsDeleteRequest): Promise<LogRecordsDeleteResponse>;
Defined in: src/api-client/galileo-client.ts Delete sessions matching the provided filter criteria.

Parameters

options
LogRecordsDeleteRequest Delete request object

Returns

Promise<LogRecordsDeleteResponse> Promise resolving to a response indicating the deletion operation result

deleteSpans()

deleteSpans(options: LogRecordsDeleteRequest): Promise<LogRecordsDeleteResponse>;
Defined in: src/api-client/galileo-client.ts Delete spans matching the provided filter criteria.

Parameters

options
LogRecordsDeleteRequest Delete request object

Returns

Promise<LogRecordsDeleteResponse> Promise resolving to a response indicating the deletion operation result

deleteTraces()

deleteTraces(options: LogRecordsDeleteRequest): Promise<LogRecordsDeleteResponse>;
Defined in: src/api-client/galileo-client.ts Delete traces matching the provided filter criteria.

Parameters

options
LogRecordsDeleteRequest Delete request object

Returns

Promise<LogRecordsDeleteResponse> Promise resolving to a response indicating the deletion operation result

deleteUserProjectCollaborator()

deleteUserProjectCollaborator(userId: string, projectId: string): Promise<void>;
Defined in: src/api-client/galileo-client.ts Removes a user collaborator from a project.

Parameters

userId
string ID of the collaborator to delete.
projectId
string ID of the project the collaborator belongs to.

Returns

Promise<void> A promise that resolves when the collaborator is removed.

exportRecords()

exportRecords(options: LogRecordsExportRequest): Promise<AsyncIterable<string | Record<string, unknown>, any, any>>;
Defined in: src/api-client/galileo-client.ts Stream records from the export endpoint. Defaults to the first log stream available if logStreamId and experimentId are not provided. Setup (validation, log stream resolution) happens immediately when this function is called. The HTTP request is made immediately when this function is called. Record streaming and line buffering happen when the returned AsyncIterable is iterated.

Parameters

options
LogRecordsExportRequest

Returns

Promise<AsyncIterable<string | Record<string, unknown>, any, any>> A Promise that resolves to an AsyncIterable that yields records based on the export format.
  • For JSONL format: Each record is a string containing a complete JSONL line (JSON object as string with trailing newline)
  • For JSON format: Each record is a Record<string, unknown> (parsed JSON object)
  • For CSV format: Each record is a string containing a complete CSV line (with trailing newline)

extendDataset()

extendDataset(params: SyntheticDatasetExtensionRequest): Promise<SyntheticDatasetExtensionResponse>;
Defined in: src/api-client/galileo-client.ts Extends a dataset with synthetically generated data.

Parameters

params
SyntheticDatasetExtensionRequest Configuration for synthetic dataset generation.

Returns

Promise<SyntheticDatasetExtensionResponse> A promise that resolves to the synthetic dataset extension response.

getAggregatedTraceView()

getAggregatedTraceView(options: AggregatedTraceViewRequest): Promise<AggregatedTraceViewResponse>;
Defined in: src/api-client/galileo-client.ts Get an aggregated view of traces, providing a graph representation of trace relationships and patterns.

Parameters

options
AggregatedTraceViewRequest Request object

Returns

Promise<AggregatedTraceViewResponse> Promise resolving to an aggregated trace view with graph data

getApiUrl()

protected getApiUrl(projectType: string): string;
Defined in: src/api-client/base-client.ts

Parameters

projectType
string

Returns

string

Inherited from

BaseClient.getApiUrl;

getAuthHeader()

protected getAuthHeader(token: string): object;
Defined in: src/api-client/base-client.ts

Parameters

token
string

Returns

object
Authorization
Authorization: string;

Inherited from

BaseClient.getAuthHeader;

getDataset()

getDataset(id: string): Promise<DatasetDBType>;
Defined in: src/api-client/galileo-client.ts Gets a dataset by ID.

Parameters

id
string The ID of the dataset to retrieve.

Returns

Promise<DatasetDBType> A promise that resolves to the dataset.

getDatasetByName()

getDatasetByName(name: string): Promise<DatasetDBType>;
Defined in: src/api-client/galileo-client.ts Gets a dataset by name.

Parameters

name
string The name of the dataset to retrieve.

Returns

Promise<DatasetDBType> A promise that resolves to the dataset.

getDatasetContent()

getDatasetContent(datasetId: string): Promise<DatasetRow[]>;
Defined in: src/api-client/galileo-client.ts Gets the content of a dataset.

Parameters

datasetId
string The ID of the dataset.

Returns

Promise<DatasetRow[]> A promise that resolves to the rows of the dataset.

getDatasetEtag()

getDatasetEtag(id: string): Promise<string>;
Defined in: src/api-client/galileo-client.ts Gets the ETag for a dataset used for optimistic concurrency control.

Parameters

id
string The ID of the dataset.

Returns

Promise<string> A promise that resolves to the dataset ETag.

getDatasets()

getDatasets(limit?: number): Promise<DatasetDBType[]>;
Defined in: src/api-client/galileo-client.ts Gets all datasets visible to the client.

Parameters

limit?
number

Returns

Promise<DatasetDBType[]> A promise that resolves to the list of datasets.

getDatasetVersionContent()

getDatasetVersionContent(datasetId: string, versionIndex: number): Promise<DatasetContent>;
Defined in: src/api-client/galileo-client.ts Gets the content for a specific version of a dataset.

Parameters

datasetId
string The ID of the dataset.
versionIndex
number The index of the version to retrieve.

Returns

Promise<DatasetContent> A promise that resolves to the dataset content for the specified version.

getDatasetVersionHistory()

getDatasetVersionHistory(datasetId: string): Promise<DatasetVersionHistory>;
Defined in: src/api-client/galileo-client.ts Gets the version history for a dataset.

Parameters

datasetId
string The ID of the dataset.

Returns

Promise<DatasetVersionHistory> A promise that resolves to the version history.

getExperiment()

getExperiment(id: string): Promise<ExperimentResponseType>;
Defined in: src/api-client/galileo-client.ts

Parameters

id
string

Returns

Promise<ExperimentResponseType>

getExperimentMetrics()

getExperimentMetrics(
   id: string,
   projectId: string,
metricsRequest: ExperimentMetricsRequest): Promise<ExperimentMetricsResponse>;
Defined in: src/api-client/galileo-client.ts Gets experiment metrics.

Parameters

id
string The unique identifier of the experiment.
projectId
string
metricsRequest
ExperimentMetricsRequest The experiment metrics request.

Returns

Promise<ExperimentMetricsResponse> A promise that resolves to the experiment metrics response.

getExperiments()

getExperiments(): Promise<ExperimentResponseType[]>;
Defined in: src/api-client/galileo-client.ts

Returns

Promise<ExperimentResponseType[]>

getExperimentsAvailableColumns()

getExperimentsAvailableColumns(): Promise<ExperimentsAvailableColumnsResponse>;
Defined in: src/api-client/galileo-client.ts Gets available columns for experiments.

Returns

Promise<ExperimentsAvailableColumnsResponse> A promise that resolves to the available columns response.

getExperimentsPaginated()

getExperimentsPaginated(options?: object): Promise<ListExperimentResponse>;
Defined in: src/api-client/galileo-client.ts Gets paginated experiments.

Parameters

options?
The pagination options.
includeCounts?
boolean (Optional) Whether to include counts (default: false).
limit?
number (Optional) The maximum number of records to return (default: 100).
startingToken?
number (Optional) The starting token for pagination (default: 0).

Returns

Promise<ListExperimentResponse> A promise that resolves to the paginated experiments response.

getExperimentTags()

getExperimentTags(experimentId: string): Promise<RunTagDB[]>;
Defined in: src/api-client/galileo-client.ts Gets all tags for a specific experiment.

Parameters

experimentId
string The unique identifier of the experiment.

Returns

Promise<RunTagDB[]> A promise that resolves to an array of experiment tags.

getExtendDatasetStatus()

getExtendDatasetStatus(datasetId: string): Promise<JobProgress>;
Defined in: src/api-client/galileo-client.ts Gets the status of a dataset extension job.

Parameters

datasetId
string The ID of the dataset being extended.

Returns

Promise<JobProgress> A promise that resolves to the job progress.

getGlobalProjectByName()

getGlobalProjectByName(name: string, projectType?: "prompt_evaluation" | "llm_monitor" | "gen_ai" | "protect"): Promise<{
  bookmark?: boolean;
  createdAt: string;
  createdBy: string;
  createdByUser: {
     email: string;
     firstName?: null | string;
     id: string;
     lastName?: null | string;
  };
  description?: null | string;
  id: string;
  labels?: "sample"[];
  name?: null | string;
  permissions?: object[];
  runs: object[];
  type?: null | "prompt_evaluation" | "llm_monitor" | "gen_ai" | "protect";
  updatedAt: string;
}>;
Defined in: src/api-client/galileo-client.ts Gets a project by name.

Parameters

name
string Name of the project to fetch.
projectType?
"prompt_evaluation" | "llm_monitor" | "gen_ai" | "protect"

Returns

Promise<{ bookmark?: boolean; createdAt: string; createdBy: string; createdByUser: { email: string; firstName?: null | string; id: string; lastName?: null | string; }; description?: null | string; id: string; labels?: "sample"[]; name?: null | string; permissions?: object[]; runs: object[]; type?: null | "prompt_evaluation" | "llm_monitor" | "gen_ai" | "protect"; updatedAt: string; }> A promise that resolves to the matching project.

getGlobalPromptTemplate()

getGlobalPromptTemplate(id: string): Promise<PromptTemplate>;
Defined in: src/api-client/galileo-client.ts Retrieves a global prompt template by ID.

Parameters

id
string Template identifier to fetch.

Returns

Promise<PromptTemplate> A promise that resolves to the prompt template payload.

getGlobalPromptTemplateVersion()

getGlobalPromptTemplateVersion(id: string, version: number): Promise<PromptTemplateVersion>;
Defined in: src/api-client/galileo-client.ts Retrieves a global prompt template version by ID.

Parameters

id
string Template identifier to fetch.
version
number Version number to retrieve.

Returns

Promise<PromptTemplateVersion> A promise that resolves to the template version payload.

getJob()

getJob(jobId: string): Promise<JobDbType>;
Defined in: src/api-client/galileo-client.ts

Parameters

jobId
string

Returns

Promise<JobDbType>

getJobsForProjectRun()

getJobsForProjectRun(projectId: string, runId: string): Promise<JobDbType[]>;
Defined in: src/api-client/galileo-client.ts

Parameters

projectId
string
runId
string

Returns

Promise<JobDbType[]>

getLogStream()

getLogStream(id: string): Promise<LogStreamType>;
Defined in: src/api-client/galileo-client.ts Retrieves a log stream by ID.

Parameters

id
string The ID of the log stream to retrieve.

Returns

Promise<LogStreamType> A promise that resolves to the log stream.

getLogStreamByName()

getLogStreamByName(name: string): Promise<LogStreamType>;
Defined in: src/api-client/galileo-client.ts Retrieves a log stream by name.

Parameters

name
string The name of the log stream to retrieve.

Returns

Promise<LogStreamType> A promise that resolves to the log stream.

getLogStreams()

getLogStreams(): Promise<LogStreamType[]>;
Defined in: src/api-client/galileo-client.ts Lists all log streams for the project.

Returns

Promise<LogStreamType[]> A promise that resolves to an array of log streams.

getProject()

getProject(id: string): Promise<{
  bookmark?: boolean;
  createdAt: string;
  createdBy: string;
  createdByUser: {
     email: string;
     firstName?: null | string;
     id: string;
     lastName?: null | string;
  };
  description?: null | string;
  id: string;
  labels?: "sample"[];
  name?: null | string;
  permissions?: object[];
  runs: object[];
  type?: null | "prompt_evaluation" | "llm_monitor" | "gen_ai" | "protect";
  updatedAt: string;
}>;
Defined in: src/api-client/galileo-client.ts Gets a project by ID.

Parameters

id
string ID of the project to fetch.

Returns

Promise<{ bookmark?: boolean; createdAt: string; createdBy: string; createdByUser: { email: string; firstName?: null | string; id: string; lastName?: null | string; }; description?: null | string; id: string; labels?: "sample"[]; name?: null | string; permissions?: object[]; runs: object[]; type?: null | "prompt_evaluation" | "llm_monitor" | "gen_ai" | "protect"; updatedAt: string; }> A promise that resolves to the matching project.

getProjectByName()

getProjectByName(name: string, options?: object): Promise<{
  bookmark?: boolean;
  createdAt: string;
  createdBy: string;
  createdByUser: {
     email: string;
     firstName?: null | string;
     id: string;
     lastName?: null | string;
  };
  description?: null | string;
  id: string;
  labels?: "sample"[];
  name?: null | string;
  permissions?: object[];
  runs: object[];
  type?: null | "prompt_evaluation" | "llm_monitor" | "gen_ai" | "protect";
  updatedAt: string;
}>;
Defined in: src/api-client/galileo-client.ts Gets a project by name.

Parameters

name
string Name of the project to fetch.
options?
(Optional) Additional lookup options.
projectType?
null | "prompt_evaluation" | "llm_monitor" | "gen_ai" | "protect" (Optional) Project type hint to disambiguate by name.

Returns

Promise<{ bookmark?: boolean; createdAt: string; createdBy: string; createdByUser: { email: string; firstName?: null | string; id: string; lastName?: null | string; }; description?: null | string; id: string; labels?: "sample"[]; name?: null | string; permissions?: object[]; runs: object[]; type?: null | "prompt_evaluation" | "llm_monitor" | "gen_ai" | "protect"; updatedAt: string; }> A promise that resolves to the matching project.

getProjectIdByName()

getProjectIdByName(name: string, projectType?: "prompt_evaluation" | "llm_monitor" | "gen_ai" | "protect"): Promise<string>;
Defined in: src/api-client/galileo-client.ts Gets a project ID by name.

Parameters

name
string Name of the project to resolve.
projectType?
"prompt_evaluation" | "llm_monitor" | "gen_ai" | "protect"

Returns

Promise<string> A promise that resolves to the project ID.

getProjects()

getProjects(projectType?: "prompt_evaluation" | "llm_monitor" | "gen_ai" | "protect"): Promise<object[]>;
Defined in: src/api-client/galileo-client.ts Lists projects available to the authenticated user.

Parameters

projectType?
(Optional) Project type filter for the request. "prompt_evaluation" | "llm_monitor" | "gen_ai" | "protect"

Returns

Promise<object[]> A promise that resolves to the accessible projects.

getPromptTemplate()

getPromptTemplate(id: string): Promise<PromptTemplate>;
Defined in: src/api-client/galileo-client.ts Retrieves a prompt template by ID from the initialized project. This method retrieves project-scoped templates only. For global templates (which can also be filtered by project), use getGlobalPromptTemplate(id) instead.

Parameters

id
string The unique identifier of the template to fetch. Must be a template ID that exists within the initialized project.

Returns

Promise<PromptTemplate> A promise that resolves to the prompt template payload containing template metadata, versions, and associated information.

Throws

Error if the template is not found in the project, if the client is not initialized with a project, or if the service is unavailable.

getPromptTemplates()

getPromptTemplates(): Promise<PromptTemplate[]>;
Defined in: src/api-client/galileo-client.ts Lists prompt templates scoped to the initialized project. These methods operate on project-scoped templates, which are templates that exist only within a specific project and are not shared across projects. The client must be initialized with a project (via init({ projectName }) or init({ projectId })) before using these methods. Note: For global templates (which can be shared across projects but can also be filtered by project), use the getGlobalPromptTemplate* methods instead. The global methods (listGlobalPromptTemplates, getGlobalPromptTemplate, etc.) support optional projectId and projectName parameters to filter results.

Returns

Promise<PromptTemplate[]> A promise that resolves to an array of prompt templates associated with the initialized project.

Throws

Error if the client is not initialized with a project or if the prompt template service is not available.

getPromptTemplateVersion()

getPromptTemplateVersion(id: string, version: number): Promise<PromptTemplateVersion>;
Defined in: src/api-client/galileo-client.ts Retrieves a specific prompt template version by ID and version number. Templates can have multiple versions. This method fetches a specific version of a project-scoped template within the initialized project. For global templates (which can also be filtered by project), use getGlobalPromptTemplateVersion(id, version) instead.

Parameters

id
string The unique identifier of the template.
version
number The version number to retrieve. Version numbers are typically sequential integers starting from 1.

Returns

Promise<PromptTemplateVersion> A promise that resolves to the prompt template version payload, including the template content, settings, and version metadata.

Throws

Error if the template or version is not found in the project, if the client is not initialized with a project, or if the service is unavailable.

getPromptTemplateVersionByName()

getPromptTemplateVersionByName(name: string, version?: number): Promise<PromptTemplateVersion>;
Defined in: src/api-client/galileo-client.ts Resolves a prompt template by name and fetches the requested version. This method first searches for a project-scoped template by name within the initialized project, then retrieves the specified version. If no version is provided, it returns the currently selected version of the template. For global templates (which can be filtered by project using projectId or projectName in the options), use listGlobalPromptTemplates() with name filtering and project filtering, then getGlobalPromptTemplateVersion().

Parameters

name
string The name of the template to search for. The search is performed within the scope of the initialized project.
version?
number (Optional) The version number to fetch. If not provided, defaults to the template’s selected version (typically the latest).

Returns

Promise<PromptTemplateVersion> A promise that resolves to the prompt template version payload.

Throws

Error if no template with the given name is found in the project, if the specified version doesn’t exist, if the client is not initialized with a project, or if the service is unavailable.

getRunScorerJobs()

getRunScorerJobs(projectId: string, runId: string): Promise<JobDbType[]>;
Defined in: src/api-client/galileo-client.ts

Parameters

projectId
string
runId
string

Returns

Promise<JobDbType[]>

getScorers()

getScorers(options?: object): Promise<ScorerResponse[]>;
Defined in: src/api-client/galileo-client.ts Lists scorers with optional filtering (backward compatible, use getScorersPage for pagination and limit).

Parameters

options?
(Optional) The filtering options.
names?
string[] (Optional) Filter by multiple scorer names.
type?
ScorerTypes (Optional) Filter by a single scorer type.

Returns

Promise<ScorerResponse[]> A promise that resolves to an array of scorers.

getScorersPage()

getScorersPage(options?: object): Promise<ListScorersResponse>;
Defined in: src/api-client/galileo-client.ts Lists scorers with pagination support.

Parameters

options?
(Optional) The filtering and pagination options.
limit?
number (Optional) The maximum number of scorers to return.
name?
string (Optional) Filter by a single scorer name.
names?
string[] (Optional) Filter by multiple scorer names.
startingToken?
number (Optional) The starting token for pagination.
types?
ScorerTypes[] (Optional) Filter by scorer types.

Returns

Promise<ListScorersResponse> A promise that resolves to an object containing scorers and the next starting token.

getScorersPageByIds()

getScorersPageByIds(options: object): Promise<ListScorersResponse>;
Defined in: src/api-client/galileo-client.ts Retrieves a page of scorers filtered by ID.

Parameters

options
ids
string[]
limit?
number
startingToken?
number

Returns

Promise<ListScorersResponse>

getScorersPageByLabels()

getScorersPageByLabels(options: object): Promise<ListScorersResponse>;
Defined in: src/api-client/galileo-client.ts Retrieves a page of scorers filtered by label.

Parameters

options
caseSensitive?
boolean
labels
string[]
limit?
number
startingToken?
number
strict?
boolean

Returns

Promise<ListScorersResponse>

getScorerVersion()

getScorerVersion(scorerId: string, version: number): Promise<BaseScorerVersionResponse>;
Defined in: src/api-client/galileo-client.ts Retrieves a specific version of a scorer.

Parameters

scorerId
string The unique identifier of the scorer.
version
number The version number to retrieve.

Returns

Promise<BaseScorerVersionResponse> A promise that resolves to the scorer version.

getSession()

getSession(sessionId: string): Promise<ExtendedSessionRecordWithChildren>;
Defined in: src/api-client/galileo-client.ts Retrieve a session by its ID, including all child traces and spans.

Parameters

sessionId
string The unique identifier of the session to retrieve

Returns

Promise<ExtendedSessionRecordWithChildren> Promise resolving to the session record with its children

getSessionsAvailableColumns()

getSessionsAvailableColumns(options: LogRecordsAvailableColumnsRequest): Promise<LogRecordsAvailableColumnsResponse>;
Defined in: src/api-client/galileo-client.ts Get the list of available columns for sessions that can be used in queries and filters.

Parameters

options
LogRecordsAvailableColumnsRequest Request object

Returns

Promise<LogRecordsAvailableColumnsResponse> Promise resolving to a response containing the available columns

getSpan()

getSpan(spanId: string): Promise<ExtendedSpanRecord>;
Defined in: src/api-client/galileo-client.ts Retrieve a span by its ID.

Parameters

spanId
string The unique identifier of the span to retrieve

Returns

Promise<ExtendedSpanRecord> Promise resolving to the span record

getSpansAvailableColumns()

getSpansAvailableColumns(options: LogRecordsAvailableColumnsRequest): Promise<LogRecordsAvailableColumnsResponse>;
Defined in: src/api-client/galileo-client.ts Get the list of available columns for spans that can be used in queries and filters.

Parameters

options
LogRecordsAvailableColumnsRequest Request object

Returns

Promise<LogRecordsAvailableColumnsResponse> Promise resolving to a response containing the available columns

getTrace()

getTrace(traceId: string): Promise<ExtendedTraceRecordWithChildren>;
Defined in: src/api-client/galileo-client.ts Retrieve a trace by its ID, including all child spans.

Parameters

traceId
string The unique identifier of the trace to retrieve

Returns

Promise<ExtendedTraceRecordWithChildren> Promise resolving to the trace record with its children

getTracesAvailableColumns()

getTracesAvailableColumns(options: LogRecordsAvailableColumnsRequest): Promise<LogRecordsAvailableColumnsResponse>;
Defined in: src/api-client/galileo-client.ts Get the list of available columns for traces that can be used in queries and filters.

Parameters

options
LogRecordsAvailableColumnsRequest Request object

Returns

Promise<LogRecordsAvailableColumnsResponse> Promise resolving to a response containing the available columns

healthCheck()

protected healthCheck(): Promise<boolean>;
Defined in: src/api-client/base-client.ts

Returns

Promise<boolean>

Inherited from

BaseClient.healthCheck;

ingestSpans()

ingestSpans(options: LogSpansIngestRequest): Promise<LogSpansIngestResponse>;
Defined in: src/api-client/galileo-client.ts Ingest spans into a trace. Spans represent individual operations or steps within a trace.

Parameters

options
LogSpansIngestRequest Ingest request object

Returns

Promise<LogSpansIngestResponse> Promise resolving to a response indicating the ingestion result

ingestTraces()

ingestTraces(options: LogTracesIngestRequest): Promise<LogTracesIngestResponse>;
Defined in: src/api-client/galileo-client.ts

Parameters

options
LogTracesIngestRequest

Returns

Promise<LogTracesIngestResponse>

ingestTracesLegacy()

ingestTracesLegacy(traces: Trace[]): Promise<void>;
Defined in: src/api-client/galileo-client.ts

Parameters

traces
Trace[]

Returns

Promise<void>

init()

init(params: Partial<GalileoApiClientParams>): Promise<void>;
Defined in: src/api-client/galileo-client.ts

Parameters

params
Partial<GalileoApiClientParams> = {}

Returns

Promise<void>

initializeClient()

protected initializeClient(): void;
Defined in: src/api-client/base-client.ts

Returns

void

Inherited from

BaseClient.initializeClient;

listDatasetProjects()

listDatasetProjects(datasetId: string, limit: number): Promise<ListDatasetProjectsResponse>;
Defined in: src/api-client/galileo-client.ts Lists all projects that use a dataset.

Parameters

datasetId
string The ID of the dataset.
limit
number = 100 (Optional) The maximum number of projects to return.

Returns

Promise<ListDatasetProjectsResponse> A promise that resolves to the list of projects that use the dataset.

listGlobalPromptTemplates()

Call Signature

listGlobalPromptTemplates(
   nameFilter: string,
   limit: number,
startingToken: number): Promise<ListPromptTemplateResponse>;
Defined in: src/api-client/galileo-client.ts Lists global prompt templates using name filter, limit, and pagination token.
Parameters
nameFilter
string Template name filter. Filters templates by name containing this string.
limit
number Maximum number of templates to fetch per page.
startingToken
number Pagination starting token (default: 0 for first page).
Returns
Promise<ListPromptTemplateResponse> A promise that resolves to the list response payload containing templates and pagination info.

Call Signature

listGlobalPromptTemplates(options: GlobalPromptTemplateListOptions): Promise<ListPromptTemplateResponse>;
Defined in: src/api-client/galileo-client.ts Lists global prompt templates using optional filters and pagination.
Parameters
options
GlobalPromptTemplateListOptions (Optional) Options for the list call.
Returns
Promise<ListPromptTemplateResponse> A promise that resolves to the list response payload.

listUserProjectCollaborators()

listUserProjectCollaborators(options?: object): Promise<{
  collaborators: object[];
  limit?: number;
  nextStartingToken?: null | number;
  paginated?: boolean;
  startingToken?: number;
}>;
Defined in: src/api-client/galileo-client.ts Lists project collaborators with optional pagination controls.

Parameters

options?
(Optional) Options for the list operation.
limit?
number (Optional) Maximum collaborators to return per page.
projectId?
string (Optional) Explicit project ID override.
startingToken?
number (Optional) Pagination token to start from.

Returns

Promise<{ collaborators: object[]; limit?: number; nextStartingToken?: null | number; paginated?: boolean; startingToken?: number; }> A promise that resolves to the collaborators list payload.

makeRequest()

makeRequest<T>(
   request_method: Method,
   endpoint: Routes,
   data?: null | string | Record<string, any>,
   params?: Record<string, unknown>,
extraHeaders?: Record<string, string>): Promise<T>;
Defined in: src/api-client/base-client.ts

Type Parameters

T
T

Parameters

request_method
Method
endpoint
Routes
data?
null | string | Record<string, any>
params?
Record<string, unknown>
extraHeaders?
Record<string, string>

Returns

Promise<T>

Inherited from

BaseClient.makeRequest;

makeRequestRaw()

makeRequestRaw<T>(
   request_method: Method,
   endpoint: Routes,
   data?: null | string | Record<string, any>,
   params?: Record<string, unknown>,
   extraHeaders?: Record<string, string>): Promise<AxiosResponse<T, any, {
}>>;
Defined in: src/api-client/base-client.ts Make an HTTP request to the Galileo API and return the raw Axios response.

Type Parameters

T
T

Parameters

request_method
Method
endpoint
Routes
data?
null | string | Record<string, any>
params?
Record<string, unknown>
extraHeaders?
Record<string, string>

Returns

Promise<AxiosResponse<T, any, { }>>

Inherited from

BaseClient.makeRequestRaw;

makeRequestWithConversion()

makeRequestWithConversion<SourceCamelType, SourceSnakeType, ResponseSnakeType, ResponseCamelType>(
   request_method: Method,
   endpoint: Routes,
   data: SourceCamelType,
params?: Record<string, unknown>): Promise<ValidatedCamelCase<ResponseSnakeType, ResponseCamelType>>;
Defined in: src/api-client/base-client.ts

Type Parameters

SourceCamelType
SourceCamelType extends object
SourceSnakeType
SourceSnakeType extends object
ResponseSnakeType
ResponseSnakeType extends object
ResponseCamelType
ResponseCamelType extends object

Parameters

request_method
Method
endpoint
Routes
data
SourceCamelType
params?
Record<string, unknown>

Returns

Promise<ValidatedCamelCase<ResponseSnakeType, ResponseCamelType>>

Inherited from

BaseClient.makeRequestWithConversion;

makeStreamingRequest()

makeStreamingRequest(
   request_method: Method,
   endpoint: Routes,
   data?: null | string | Record<string, any>,
   params?: Record<string, unknown>,
extraHeaders?: Record<string, string>): Promise<Readable>;
Defined in: src/api-client/base-client.ts

Parameters

request_method
Method
endpoint
Routes
data?
null | string | Record<string, any>
params?
Record<string, unknown>
extraHeaders?
Record<string, string>

Returns

Promise<Readable>

Inherited from

BaseClient.makeStreamingRequest;

queryDatasets()

queryDatasets(params: ListDatasetParams, query?: object): Promise<ListDatasetResponse>;
Defined in: src/api-client/galileo-client.ts Queries datasets with filters and pagination options.

Parameters

params
ListDatasetParams The list dataset parameters used to filter datasets.
query?
(Optional) Pagination options for the query.
limit?
number (Optional) The maximum number of datasets to return.
startingToken?
number (Optional) The starting token for pagination.

Returns

Promise<ListDatasetResponse> A promise that resolves to the list dataset response.

recomputeMetrics()

recomputeMetrics(options: RecomputeLogRecordsMetricsRequest): Promise<unknown>;
Defined in: src/api-client/galileo-client.ts Recompute metrics for log records (traces, sessions, or spans) based on the provided filters and scorer IDs. This triggers a background job to recalculate metrics for matching records.

Parameters

options
RecomputeLogRecordsMetricsRequest Request object

Returns

Promise<unknown> Promise resolving to the recomputation job result

refreshTokenIfNeeded()

protected refreshTokenIfNeeded(endpoint: Routes): Promise<void>;
Defined in: src/api-client/base-client.ts

Parameters

endpoint
Routes

Returns

Promise<void>

Inherited from

BaseClient.refreshTokenIfNeeded;

renderPromptTemplate()

renderPromptTemplate(
   request: RenderTemplateRequest,
   startingToken?: number,
limit?: number): Promise<RenderTemplateResponse>;
Defined in: src/api-client/galileo-client.ts Renders a global prompt template using dataset or string inputs.

Parameters

request
RenderTemplateRequest Render template request payload.
startingToken?
number (Optional) Pagination starting token (default: 0).
limit?
number (Optional) Maximum records per page (default: 100).

Returns

Promise<RenderTemplateResponse> A promise that resolves to the render response payload.

searchMetrics()

searchMetrics(options: object): Promise<{
  aggregateMetrics: {
   [key: Uncapitalize<string>]:
     | number
     | {
   [key: string]: number;
   };
  };
  bucketedMetrics: {
   [key: Uncapitalize<string>]: object[];
  };
  emsCapturedError?: boolean;
  groupByColumns: string[];
  standardErrors?:   | null
     | {
   [key: Uncapitalize<string>]: object;
   };
}>;
Defined in: src/api-client/galileo-client.ts

Parameters

options
endTime
string
experimentId?
null | string
filters?
object[] | object[] | object[] | object[] | object[] | object[] | object[]
groupBy?
null | string
interval?
number
logStreamId?
null | string
metricsTestingId?
null | string
startTime
string

Returns

Promise<{ aggregateMetrics: { [key: Uncapitalize<string>]: | number | { [key: string]: number; }; }; bucketedMetrics: { [key: Uncapitalize<string>]: object[]; }; emsCapturedError?: boolean; groupByColumns: string[]; standardErrors?: | null | { [key: Uncapitalize<string>]: object; }; }>

searchSessions()

searchSessions(request: object): Promise<{
  lastRowId?: null | string;
  limit?: number;
  nextStartingToken?: null | number;
  paginated?: boolean;
  records?:   | object[]
     | object[]
     | object[]
     | object[]
     | object[]
     | object[]
     | object[]
     | object[];
  startingToken?: number;
}>;
Defined in: src/api-client/galileo-client.ts Search for sessions matching the provided query criteria.

Parameters

request
Query request object
experimentId?
null | string (Optional) Experiment ID to filter by
filters?
object[] | object[] | object[] | object[] | object[] | object[] | object[] (Optional) Array of filter objects to apply
filterTree?
| null | { filter: | { columnId: string; operator?: "eq" | "one_of" | "ne" | "contains" | "not_in"; type: "id"; value: string | string[]; } | { columnId: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte"; type: "date"; value: string; } | { columnId: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between"; type: "number"; value: number | number[]; } | { columnId: string; operator?: "eq" | "ne"; type: "boolean"; value: boolean; } | { caseSensitive?: boolean; columnId: string; operator: "eq" | "one_of" | "contains" | "not_in"; type: "collection"; value: string | string[]; } | { caseSensitive?: boolean; columnId: string; operator: "eq" | "one_of" | "ne" | "contains" | "not_in"; type: "text"; value: string | string[]; } | { columnId?: "fully_annotated"; type: "fully_annotated"; userIds?: string[]; }; } | { and: | object[] | { and: { filter: { columnId: string; operator?: “eq” | “one_of” | “ne” | “contains” | “not_in” | undefined; value: string | string[]; type: “id”; } | { columnId: string; operator: “eq” | “ne” | “gt” | “gte” | “lt” | “lte”; value: string; type: “date”; } | … 4 more … | { …; }; }[] | …[] | { …; }[] | { …; …[] | object[] | object[]; } | { or: | object[] | object[] | { or: { filter: { columnId: string; operator?: “eq” | “one_of” | “ne” | “contains” | “not_in” | undefined; value: string | string[]; type: “id”; } | { columnId: string; operator: “eq” | “ne” | “gt” | “gte” | “lt” | “lte”; value: string; type: “date”; } | … 4 more … | { …; }; }[] | { …; }[] | …[] | { …; }…[] | object[]; } | { not: | { filter: | { columnId: string; operator?: "eq" | "one_of" | "ne" | "contains" | "not_in"; type: "id"; value: string | string[]; } | { columnId: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte"; type: "date"; value: string; } | { columnId: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between"; type: "number"; value: number | number[]; } | { columnId: string; operator?: "eq" | "ne"; type: "boolean"; value: boolean; } | { caseSensitive?: boolean; columnId: string; operator: "eq" | "one_of" | "contains" | "not_in"; type: "collection"; value: string | string[]; } | { caseSensitive?: boolean; columnId: string; operator: "eq" | "one_of" | "ne" | "contains" | "not_in"; type: "text"; value: string | string[]; } | { columnId?: "fully_annotated"; type: "fully_annotated"; userIds?: string[]; }; } | { and: | object[] | { and: { filter: { columnId: string; operator?: “eq” | “one_of” | “ne” | “contains” | “not_in” | undefined; value: string | string[]; type: “id”; } | { columnId: string; operator: “eq” | “ne” | “gt” | “gte” | “lt” | “lte”; value: string; type: “date”; } | … 4 more … | { …; }; }[] | …[] | { …; }[] | { …; …[] | object[] | { not: { filter: { columnId: string; operator?: “eq” | “one_of” | “ne” | “contains” | “not_in” | undefined; value: string | string[]; type: “id”; } | { columnId: string; operator: “eq” | “ne” | “gt” | “gte” | “lt” | “lte”; value: string; type: “date”; } | … 4 more … | { …; }; } | { …; } | { …; } | …; }[]; } | { or: | object[] | object[] | { or: { filter: { columnId: string; operator?: “eq” | “one_of” | “ne” | “contains” | “not_in” | undefined; value: string | string[]; type: “id”; } | { columnId: string; operator: “eq” | “ne” | “gt” | “gte” | “lt” | “lte”; value: string; type: “date”; } | … 4 more … | { …; }; }[] | { …; }[] | …[] | { …; }…[] | { not: { filter: { columnId: string; operator?: “eq” | “one_of” | “ne” | “contains” | “not_in” | undefined; value: string | string[]; type: “id”; } | { columnId: string; operator: “eq” | “ne” | “gt” | “gte” | “lt” | “lte”; value: string; type: “date”; } | … 4 more … | { …; }; } | { …; } | { …; } | …; }[]; } | { not: { filter: { columnId: string; operator?: “eq” | “one_of” | “ne” | “contains” | “not_in” | undefined; value: string | string[]; type: “id”; } | { columnId: string; operator: “eq” | “ne” | “gt” | “gte” | “lt” | “lte”; value: string; type: “date”; } | … 4 more … | { …; }; } | { …; } | { …; } | …; }; } (Optional) Complex filter tree structure
includeCounts?
boolean
limit?
number (Optional) Maximum number of records to return (default: 100)
logStreamId?
null | string (Optional) Log stream ID to filter by
metricsTestingId?
null | string (Optional) Metrics testing ID to filter by
previousLastRowId?
null | string (Optional) Previous last row ID for pagination
sort?
| null | { ascending?: boolean; columnId: string; sortType?: "column"; } (Optional) Sort clause for ordering results
startingToken?
number (Optional) Starting token for pagination (default: 0)
truncateFields?
boolean

Returns

Promise<{ lastRowId?: null | string; limit?: number; nextStartingToken?: null | number; paginated?: boolean; records?: | object[] | object[] | object[] | object[] | object[] | object[] | object[] | object[]; startingToken?: number; }> Promise resolving to a query response containing matching session records

searchSpans()

searchSpans(options: object): Promise<{
  lastRowId?: null | string;
  limit?: number;
  nextStartingToken?: null | number;
  paginated?: boolean;
  records?:   | object[]
     | object[]
     | object[]
     | object[]
     | object[]
     | object[]
     | object[]
     | object[];
  startingToken?: number;
}>;
Defined in: src/api-client/galileo-client.ts

Parameters

options
experimentId?
null | string
filters?
object[] | object[] | object[] | object[] | object[] | object[] | object[]
filterTree?
| null | { filter: | { columnId: string; operator?: "eq" | "one_of" | "ne" | "contains" | "not_in"; type: "id"; value: string | string[]; } | { columnId: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte"; type: "date"; value: string; } | { columnId: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between"; type: "number"; value: number | number[]; } | { columnId: string; operator?: "eq" | "ne"; type: "boolean"; value: boolean; } | { caseSensitive?: boolean; columnId: string; operator: "eq" | "one_of" | "contains" | "not_in"; type: "collection"; value: string | string[]; } | { caseSensitive?: boolean; columnId: string; operator: "eq" | "one_of" | "ne" | "contains" | "not_in"; type: "text"; value: string | string[]; } | { columnId?: "fully_annotated"; type: "fully_annotated"; userIds?: string[]; }; } | { and: | object[] | { and: { filter: { columnId: string; operator?: “eq” | “one_of” | “ne” | “contains” | “not_in” | undefined; value: string | string[]; type: “id”; } | { columnId: string; operator: “eq” | “ne” | “gt” | “gte” | “lt” | “lte”; value: string; type: “date”; } | … 4 more … | { …; }; }[] | …[] | { …; }[] | { …; …[] | object[] | object[]; } | { or: | object[] | object[] | { or: { filter: { columnId: string; operator?: “eq” | “one_of” | “ne” | “contains” | “not_in” | undefined; value: string | string[]; type: “id”; } | { columnId: string; operator: “eq” | “ne” | “gt” | “gte” | “lt” | “lte”; value: string; type: “date”; } | … 4 more … | { …; }; }[] | { …; }[] | …[] | { …; }…[] | object[]; } | { not: | { filter: | { columnId: string; operator?: "eq" | "one_of" | "ne" | "contains" | "not_in"; type: "id"; value: string | string[]; } | { columnId: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte"; type: "date"; value: string; } | { columnId: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between"; type: "number"; value: number | number[]; } | { columnId: string; operator?: "eq" | "ne"; type: "boolean"; value: boolean; } | { caseSensitive?: boolean; columnId: string; operator: "eq" | "one_of" | "contains" | "not_in"; type: "collection"; value: string | string[]; } | { caseSensitive?: boolean; columnId: string; operator: "eq" | "one_of" | "ne" | "contains" | "not_in"; type: "text"; value: string | string[]; } | { columnId?: "fully_annotated"; type: "fully_annotated"; userIds?: string[]; }; } | { and: | object[] | { and: { filter: { columnId: string; operator?: “eq” | “one_of” | “ne” | “contains” | “not_in” | undefined; value: string | string[]; type: “id”; } | { columnId: string; operator: “eq” | “ne” | “gt” | “gte” | “lt” | “lte”; value: string; type: “date”; } | … 4 more … | { …; }; }[] | …[] | { …; }[] | { …; …[] | object[] | { not: { filter: { columnId: string; operator?: “eq” | “one_of” | “ne” | “contains” | “not_in” | undefined; value: string | string[]; type: “id”; } | { columnId: string; operator: “eq” | “ne” | “gt” | “gte” | “lt” | “lte”; value: string; type: “date”; } | … 4 more … | { …; }; } | { …; } | { …; } | …; }[]; } | { or: | object[] | object[] | { or: { filter: { columnId: string; operator?: “eq” | “one_of” | “ne” | “contains” | “not_in” | undefined; value: string | string[]; type: “id”; } | { columnId: string; operator: “eq” | “ne” | “gt” | “gte” | “lt” | “lte”; value: string; type: “date”; } | … 4 more … | { …; }; }[] | { …; }[] | …[] | { …; }…[] | { not: { filter: { columnId: string; operator?: “eq” | “one_of” | “ne” | “contains” | “not_in” | undefined; value: string | string[]; type: “id”; } | { columnId: string; operator: “eq” | “ne” | “gt” | “gte” | “lt” | “lte”; value: string; type: “date”; } | … 4 more … | { …; }; } | { …; } | { …; } | …; }[]; } | { not: { filter: { columnId: string; operator?: “eq” | “one_of” | “ne” | “contains” | “not_in” | undefined; value: string | string[]; type: “id”; } | { columnId: string; operator: “eq” | “ne” | “gt” | “gte” | “lt” | “lte”; value: string; type: “date”; } | … 4 more … | { …; }; } | { …; } | { …; } | …; }; }
includeCounts?
boolean
limit?
number
logStreamId?
null | string
metricsTestingId?
null | string
previousLastRowId?
null | string
sort?
| null | { ascending?: boolean; columnId: string; sortType?: "column"; }
startingToken?
number
truncateFields?
boolean

Returns

Promise<{ lastRowId?: null | string; limit?: number; nextStartingToken?: null | number; paginated?: boolean; records?: | object[] | object[] | object[] | object[] | object[] | object[] | object[] | object[]; startingToken?: number; }>

searchTraces()

searchTraces(options: object): Promise<{
  lastRowId?: null | string;
  limit?: number;
  nextStartingToken?: null | number;
  paginated?: boolean;
  records?:   | object[]
     | object[]
     | object[]
     | object[]
     | object[]
     | object[]
     | object[]
     | object[];
  startingToken?: number;
}>;
Defined in: src/api-client/galileo-client.ts

Parameters

options
experimentId?
null | string
filters?
object[] | object[] | object[] | object[] | object[] | object[] | object[]
filterTree?
| null | { filter: | { columnId: string; operator?: "eq" | "one_of" | "ne" | "contains" | "not_in"; type: "id"; value: string | string[]; } | { columnId: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte"; type: "date"; value: string; } | { columnId: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between"; type: "number"; value: number | number[]; } | { columnId: string; operator?: "eq" | "ne"; type: "boolean"; value: boolean; } | { caseSensitive?: boolean; columnId: string; operator: "eq" | "one_of" | "contains" | "not_in"; type: "collection"; value: string | string[]; } | { caseSensitive?: boolean; columnId: string; operator: "eq" | "one_of" | "ne" | "contains" | "not_in"; type: "text"; value: string | string[]; } | { columnId?: "fully_annotated"; type: "fully_annotated"; userIds?: string[]; }; } | { and: | object[] | { and: { filter: { columnId: string; operator?: “eq” | “one_of” | “ne” | “contains” | “not_in” | undefined; value: string | string[]; type: “id”; } | { columnId: string; operator: “eq” | “ne” | “gt” | “gte” | “lt” | “lte”; value: string; type: “date”; } | … 4 more … | { …; }; }[] | …[] | { …; }[] | { …; …[] | object[] | object[]; } | { or: | object[] | object[] | { or: { filter: { columnId: string; operator?: “eq” | “one_of” | “ne” | “contains” | “not_in” | undefined; value: string | string[]; type: “id”; } | { columnId: string; operator: “eq” | “ne” | “gt” | “gte” | “lt” | “lte”; value: string; type: “date”; } | … 4 more … | { …; }; }[] | { …; }[] | …[] | { …; }…[] | object[]; } | { not: | { filter: | { columnId: string; operator?: "eq" | "one_of" | "ne" | "contains" | "not_in"; type: "id"; value: string | string[]; } | { columnId: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte"; type: "date"; value: string; } | { columnId: string; operator: "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "between"; type: "number"; value: number | number[]; } | { columnId: string; operator?: "eq" | "ne"; type: "boolean"; value: boolean; } | { caseSensitive?: boolean; columnId: string; operator: "eq" | "one_of" | "contains" | "not_in"; type: "collection"; value: string | string[]; } | { caseSensitive?: boolean; columnId: string; operator: "eq" | "one_of" | "ne" | "contains" | "not_in"; type: "text"; value: string | string[]; } | { columnId?: "fully_annotated"; type: "fully_annotated"; userIds?: string[]; }; } | { and: | object[] | { and: { filter: { columnId: string; operator?: “eq” | “one_of” | “ne” | “contains” | “not_in” | undefined; value: string | string[]; type: “id”; } | { columnId: string; operator: “eq” | “ne” | “gt” | “gte” | “lt” | “lte”; value: string; type: “date”; } | … 4 more … | { …; }; }[] | …[] | { …; }[] | { …; …[] | object[] | { not: { filter: { columnId: string; operator?: “eq” | “one_of” | “ne” | “contains” | “not_in” | undefined; value: string | string[]; type: “id”; } | { columnId: string; operator: “eq” | “ne” | “gt” | “gte” | “lt” | “lte”; value: string; type: “date”; } | … 4 more … | { …; }; } | { …; } | { …; } | …; }[]; } | { or: | object[] | object[] | { or: { filter: { columnId: string; operator?: “eq” | “one_of” | “ne” | “contains” | “not_in” | undefined; value: string | string[]; type: “id”; } | { columnId: string; operator: “eq” | “ne” | “gt” | “gte” | “lt” | “lte”; value: string; type: “date”; } | … 4 more … | { …; }; }[] | { …; }[] | …[] | { …; }…[] | { not: { filter: { columnId: string; operator?: “eq” | “one_of” | “ne” | “contains” | “not_in” | undefined; value: string | string[]; type: “id”; } | { columnId: string; operator: “eq” | “ne” | “gt” | “gte” | “lt” | “lte”; value: string; type: “date”; } | … 4 more … | { …; }; } | { …; } | { …; } | …; }[]; } | { not: { filter: { columnId: string; operator?: “eq” | “one_of” | “ne” | “contains” | “not_in” | undefined; value: string | string[]; type: “id”; } | { columnId: string; operator: “eq” | “ne” | “gt” | “gte” | “lt” | “lte”; value: string; type: “date”; } | … 4 more … | { …; }; } | { …; } | { …; } | …; }; }
includeCounts?
boolean
limit?
number
logStreamId?
null | string
metricsTestingId?
null | string
previousLastRowId?
null | string
sort?
| null | { ascending?: boolean; columnId: string; sortType?: "column"; }
startingToken?
number
truncateFields?
boolean

Returns

Promise<{ lastRowId?: null | string; limit?: number; nextStartingToken?: null | number; paginated?: boolean; records?: | object[] | object[] | object[] | object[] | object[] | object[] | object[] | object[]; startingToken?: number; }>

updateExperiment()

updateExperiment(id: string, updateRequest: ExperimentUpdateRequest): Promise<ExperimentResponseType>;
Defined in: src/api-client/galileo-client.ts Updates an experiment.

Parameters

id
string The unique identifier of the experiment.
updateRequest
ExperimentUpdateRequest The experiment update request.

Returns

Promise<ExperimentResponseType> A promise that resolves to the updated experiment.

updateGlobalPromptTemplate()

updateGlobalPromptTemplate(templateId: string, name: string): Promise<PromptTemplate>;
Defined in: src/api-client/galileo-client.ts Renames a global prompt template.

Parameters

templateId
string Template identifier to update.
name
string New template name.

Returns

Promise<PromptTemplate> A promise that resolves to the updated template payload.

updateRunScorerSettings()

updateRunScorerSettings(options: object): Promise<RunScorerSettingsResponse>;
Defined in: src/api-client/galileo-client.ts Updates scorer settings for a specific run using PATCH upsert semantics.

Parameters

options
The run scorer settings options.
projectId
string The unique identifier of the project.
runId
string The unique identifier of the run.
scorers
ScorerConfig[] The list of scorer configurations to apply.
segmentFilters?
null | SegmentFilter[] (Optional) The list of segment filters to apply.

Returns

Promise<RunScorerSettingsResponse> A promise that resolves to the updated scorer settings response.

Throws

Error if validation errors occur (HTTP 422) or if the update fails.

updateSpan()

updateSpan(options: LogSpanUpdateRequest): Promise<LogSpanUpdateResponse>;
Defined in: src/api-client/galileo-client.ts Update a span with new data.

Parameters

options
LogSpanUpdateRequest Update request object

Returns

Promise<LogSpanUpdateResponse> Promise resolving to the updated span record

updateTrace()

updateTrace(options: LogTraceUpdateRequest): Promise<LogTraceUpdateResponse>;
Defined in: src/api-client/galileo-client.ts Update a trace with new data.

Parameters

options
LogTraceUpdateRequest Update request object

Returns

Promise<LogTraceUpdateResponse> Promise resolving to the updated trace record

updateUserProjectCollaborator()

updateUserProjectCollaborator(
   userId: string,
   update: object,
   projectId?: string): Promise<{
  createdAt: string;
  email: string;
  firstName: null | string;
  id: string;
  lastName: null | string;
  permissions?: object[];
  role: "owner" | "editor" | "annotator" | "viewer";
  userId: string;
}>;
Defined in: src/api-client/galileo-client.ts Updates a user collaborator.

Parameters

userId
string ID of the collaborator to update.
update
Update payload describing the collaborator changes.
role
"owner" | "editor" | "annotator" | "viewer"
projectId?
string (Optional) Project ID override when not using a scoped client.

Returns

Promise<{ createdAt: string; email: string; firstName: null | string; id: string; lastName: null | string; permissions?: object[]; role: "owner" | "editor" | "annotator" | "viewer"; userId: string; }> A promise that resolves to the updated collaborator.

upsertExperimentTag()

upsertExperimentTag(
   experimentId: string,
   key: string,
   value: string,
tagType: string): Promise<RunTagDB>;
Defined in: src/api-client/galileo-client.ts Upserts (creates or updates) a tag for a specific experiment.

Parameters

experimentId
string The unique identifier of the experiment.
key
string The tag key.
value
string The tag value.
tagType
string = 'generic' (Optional) The type of tag (default: ‘generic’).

Returns

Promise<RunTagDB> A promise that resolves to the created or updated tag.

validateAxiosResponse()

protected validateAxiosResponse(response: AxiosResponse): void;
Defined in: src/api-client/base-client.ts

Parameters

response
AxiosResponse

Returns

void

Inherited from

BaseClient.validateAxiosResponse;

validateCodeScorerAndWait()

validateCodeScorerAndWait(
   codeContent: string,
   scoreableNodeTypes: (
  | "agent"
  | "llm"
  | "retriever"
  | "tool"
  | "workflow"
  | "control"
  | "trace"
  | "session")[],
   timeoutMs?: number,
   pollIntervalMs?: number,
requiredScorers?: string[]): Promise<ValidateRegisteredScorerResult>;
Defined in: src/api-client/galileo-client.ts

Parameters

codeContent
string
scoreableNodeTypes
( | "agent" | "llm" | "retriever" | "tool" | "workflow" | "control" | "trace" | "session")[]
timeoutMs?
number
pollIntervalMs?
number
requiredScorers?
string[]

Returns

Promise<ValidateRegisteredScorerResult>

getTimestampRecord()

static getTimestampRecord(): Date;
Defined in: src/api-client/galileo-client.ts

Returns

Date