> ## 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.

# GalileoApiClient

***

# Class: GalileoApiClient

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/galileo-client.ts)

## Extends

* `BaseClient`

## Constructors

### Constructor

```ts theme={null}
new GalileoApiClient(): GalileoApiClient;
```

#### Returns

`GalileoApiClient`

#### Inherited from

```ts theme={null}
BaseClient.constructor;
```

## Properties

### client

```ts theme={null}
protected client: undefined | Client<paths, `${string}/${string}`> = undefined;
```

Defined in: [src/api-client/base-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/base-client.ts)

#### Inherited from

```ts theme={null}
BaseClient.client;
```

***

### datasetId

```ts theme={null}
datasetId: string = "";
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/galileo-client.ts)

***

### experimentId

```ts theme={null}
experimentId: string = "";
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/galileo-client.ts)

***

### logStreamId

```ts theme={null}
logStreamId: string = "";
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/galileo-client.ts)

***

### projectId

```ts theme={null}
projectId: string = "";
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/galileo-client.ts)

***

### projectScoped

```ts theme={null}
projectScoped: boolean = true;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/galileo-client.ts)

***

### projectType

```ts theme={null}
projectType: "prompt_evaluation" | "llm_monitor" | "gen_ai" | "protect" = ProjectTypes.genAI;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/galileo-client.ts)

***

### runId

```ts theme={null}
runId: string = "";
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/galileo-client.ts)

***

### sessionId?

```ts theme={null}
optional sessionId: string = undefined;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/galileo-client.ts)

***

### token

```ts theme={null}
protected token: string = '';
```

Defined in: [src/api-client/base-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/base-client.ts)

#### Inherited from

```ts theme={null}
BaseClient.token;
```

***

### timestampRecord

```ts theme={null}
static timestampRecord: number = 0;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/galileo-client.ts)

## Accessors

### apiUrl

#### Get Signature

```ts theme={null}
get protected apiUrl(): string;
```

Defined in: [src/api-client/base-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/base-client.ts)

##### Returns

`string`

#### Set Signature

```ts theme={null}
set protected apiUrl(url: string): void;
```

Defined in: [src/api-client/base-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/base-client.ts)

##### Parameters

###### url

`string`

##### Returns

`void`

#### Inherited from

```ts theme={null}
BaseClient.apiUrl;
```

## Methods

### appendRowsToDatasetContent()

```ts theme={null}
appendRowsToDatasetContent(
   datasetId: string,
   etag: string,
rows: DatasetAppendRow[]): Promise<void>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/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()

```ts theme={null}
convertToCamelCase<T, TTarget>(obj: T): ValidatedCamelCase<T, TTarget>;
```

Defined in: [src/api-client/base-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/base-client.ts)

#### Type Parameters

##### T

`T` *extends* `object`

##### TTarget

`TTarget`

#### Parameters

##### obj

`T`

#### Returns

`ValidatedCamelCase`\<`T`, `TTarget`>

#### Inherited from

```ts theme={null}
BaseClient.convertToCamelCase;
```

***

### convertToSnakeCase()

```ts theme={null}
convertToSnakeCase<T, TTarget>(obj: T): ValidatedSnakeCase<T, TTarget>;
```

Defined in: [src/api-client/base-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/base-client.ts)

#### Type Parameters

##### T

`T` *extends* `object`

##### TTarget

`TTarget`

#### Parameters

##### obj

`T`

#### Returns

`ValidatedSnakeCase`\<`T`, `TTarget`>

#### Inherited from

```ts theme={null}
BaseClient.convertToSnakeCase;
```

***

### countSessions()

```ts theme={null}
countSessions(options: LogRecordsQueryCountRequest): Promise<LogRecordsQueryCountResponse>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/galileo-client.ts)

Count the number of sessions matching the provided query criteria.

#### Parameters

##### options

[`LogRecordsQueryCountRequest`](/sdk-api/typescript/reference/types/type-aliases/LogRecordsQueryCountRequest)

Count request object

#### Returns

`Promise`\<[`LogRecordsQueryCountResponse`](/sdk-api/typescript/reference/types/type-aliases/LogRecordsQueryCountResponse)>

Promise resolving to a response containing the total count

***

### countSpans()

```ts theme={null}
countSpans(options: LogRecordsQueryCountRequest): Promise<LogRecordsQueryCountResponse>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/galileo-client.ts)

Count the number of spans matching the provided query criteria.

#### Parameters

##### options

[`LogRecordsQueryCountRequest`](/sdk-api/typescript/reference/types/type-aliases/LogRecordsQueryCountRequest)

Count request object

#### Returns

`Promise`\<[`LogRecordsQueryCountResponse`](/sdk-api/typescript/reference/types/type-aliases/LogRecordsQueryCountResponse)>

Promise resolving to a response containing the total count

***

### countTraces()

```ts theme={null}
countTraces(options: LogRecordsQueryCountRequest): Promise<LogRecordsQueryCountResponse>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/galileo-client.ts)

Count the number of traces matching the provided query criteria.

#### Parameters

##### options

[`LogRecordsQueryCountRequest`](/sdk-api/typescript/reference/types/type-aliases/LogRecordsQueryCountRequest)

Count request object

#### Returns

`Promise`\<[`LogRecordsQueryCountResponse`](/sdk-api/typescript/reference/types/type-aliases/LogRecordsQueryCountResponse)>

Promise resolving to a response containing the total count

***

### createCodeScorerVersion()

```ts theme={null}
createCodeScorerVersion(
   scorerId: string,
   codeContent: string,
validationResult?: string): Promise<BaseScorerVersionResponse>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/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`](/sdk-api/typescript/reference/types/type-aliases/BaseScorerVersionResponse)>

A promise that resolves to the created scorer version.

***

### createDataset()

#### Call Signature

```ts theme={null}
createDataset(
   name: string,
   filePath: string,
format: DatasetFormat): Promise<any>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/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`](/sdk-api/typescript/reference/README/type-aliases/DatasetFormat)

The format of the dataset file.

##### Returns

`Promise`\<`any`>

A promise that resolves to the created dataset.

#### Call Signature

```ts theme={null}
createDataset(params: object): Promise<any>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/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`](/sdk-api/typescript/reference/README/type-aliases/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()

```ts theme={null}
createExperiment(name: string, dataset?:
  | null
| ExperimentDatasetRequest): Promise<ExperimentResponseType>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/galileo-client.ts)

#### Parameters

##### name

`string`

##### dataset?

`null` | [`ExperimentDatasetRequest`](/sdk-api/typescript/reference/types/type-aliases/ExperimentDatasetRequest)

#### Returns

`Promise`\<[`ExperimentResponseType`](/sdk-api/typescript/reference/types/type-aliases/ExperimentResponseType)>

***

### createGlobalPromptTemplate()

```ts theme={null}
createGlobalPromptTemplate(
   template: object[],
   name: string,
options?: object): Promise<PromptTemplate>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/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`](/sdk-api/typescript/reference/types/type-aliases/PromptTemplate)>

A promise that resolves to the created template payload.

***

### createJob()

```ts theme={null}
createJob(options: object): Promise<CreateJobResponse>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/galileo-client.ts)

#### Parameters

##### options

###### datasetId

`string`

###### name

`string`

###### projectId

`string`

###### promptSettings

[`PromptRunSettings`](/sdk-api/typescript/reference/types/interfaces/PromptRunSettings)

###### promptTemplateId

`string`

###### runId

`string`

###### scorers?

[`ScorerConfig`](/sdk-api/typescript/reference/types/type-aliases/ScorerConfig)\[]

###### taskType

[`TaskType`](/sdk-api/typescript/reference/types/enumerations/TaskType)

#### Returns

`Promise`\<[`CreateJobResponse`](/sdk-api/typescript/reference/types/type-aliases/CreateJobResponse)>

***

### createLlmScorerVersion()

#### Call Signature

```ts theme={null}
createLlmScorerVersion(scorerId: string, options: object): Promise<BaseScorerVersionResponse>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/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**

```ts theme={null}
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**

```ts theme={null}
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`](/sdk-api/typescript/reference/types/type-aliases/BaseScorerVersionResponse)>

A promise that resolves to the created scorer version.

#### Call Signature

```ts theme={null}
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](https://github.com/rungalileo/galileo-js/blob/main/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**

```ts theme={null}
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**

```ts theme={null}
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`](/sdk-api/typescript/reference/types/type-aliases/BaseScorerVersionResponse)>

A promise that resolves to the created scorer version.

***

### createLogStream()

```ts theme={null}
createLogStream(name: string): Promise<LogStreamType>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/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`](/sdk-api/typescript/reference/types/type-aliases/LogStreamType)>

A promise that resolves to the created log stream.

***

### createLogStreamScorerSettings()

```ts theme={null}
createLogStreamScorerSettings(logStreamId: string, scorers: ScorerConfig[]): Promise<void>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/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`](/sdk-api/typescript/reference/types/type-aliases/ScorerConfig)\[]

Array of scorer configurations to apply.

#### Returns

`Promise`\<`void`>

A promise that resolves when the scorer settings are created.

***

### createProject()

```ts theme={null}
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](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/galileo-client.ts)

Creates a new project.

#### Parameters

##### name

`string`

Name of the project to create.

##### options?

[`ProjectCreateOptions`](/sdk-api/typescript/reference/types/type-aliases/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()

```ts theme={null}
createPromptRunJob(
   experimentId: string,
   projectId: string,
   promptTemplateVersionId: string,
   datasetId: string,
   scorers?: ScorerConfig[],
promptSettings?: PromptRunSettings): Promise<CreateJobResponse>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/galileo-client.ts)

#### Parameters

##### experimentId

`string`

##### projectId

`string`

##### promptTemplateVersionId

`string`

##### datasetId

`string`

##### scorers?

[`ScorerConfig`](/sdk-api/typescript/reference/types/type-aliases/ScorerConfig)\[]

##### promptSettings?

[`PromptRunSettings`](/sdk-api/typescript/reference/types/interfaces/PromptRunSettings)

#### Returns

`Promise`\<[`CreateJobResponse`](/sdk-api/typescript/reference/types/type-aliases/CreateJobResponse)>

***

### createPromptTemplate()

```ts theme={null}
createPromptTemplate(template: object[], name: string): Promise<PromptTemplate>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/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`](/sdk-api/typescript/reference/types/type-aliases/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()~~

```ts theme={null}
createRunScorerSettings(
   experimentId: string,
   projectId: string,
scorers: ScorerConfig[]): Promise<void>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/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`](/sdk-api/typescript/reference/types/type-aliases/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

```ts theme={null}
createScorer(options: createScorerOptions): Promise<ScorerResponse>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/galileo-client.ts)

Creates a new scorer.

##### Parameters

###### options

[`createScorerOptions`](/sdk-api/typescript/reference/types/type-aliases/createScorerOptions)

The scorer creation options.

##### Returns

`Promise`\<[`ScorerResponse`](/sdk-api/typescript/reference/types/type-aliases/ScorerResponse)>

A promise that resolves to the created scorer.

#### Call Signature

```ts theme={null}
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](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/galileo-client.ts)

Creates a new scorer.

##### Parameters

###### name

`string`

The name of the scorer.

###### scorerType

[`ScorerTypes`](/sdk-api/typescript/reference/types/enumerations/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`](/sdk-api/typescript/reference/types/enumerations/OutputType)

(Optional) The output type for the scorer.

###### inputType?

[`InputType`](/sdk-api/typescript/reference/types/enumerations/InputType)

(Optional) The input type for the scorer.

##### Returns

`Promise`\<[`ScorerResponse`](/sdk-api/typescript/reference/types/type-aliases/ScorerResponse)>

A promise that resolves to the created scorer.

***

### createSessionLegacy()

```ts theme={null}
createSessionLegacy(__namedParameters: object): Promise<SessionCreateResponse>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/galileo-client.ts)

#### Parameters

##### \_\_namedParameters

###### externalId?

`string`

###### metadata?

`Record`\<`string`, `string`>

###### name?

`string`

###### previousSessionId?

`string`

#### Returns

`Promise`\<[`SessionCreateResponse`](/sdk-api/typescript/reference/types/type-aliases/SessionCreateResponse)>

***

### createUserProjectCollaborators()

```ts theme={null}
createUserProjectCollaborators(collaborators: object[], projectId?: string): Promise<object[]>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/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()

```ts theme={null}
deleteDataset(datasetId: string): Promise<void>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/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()

```ts theme={null}
deleteExperiment(id: string): Promise<void>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/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()

```ts theme={null}
deleteExperimentTag(experimentId: string, tagId: string): Promise<void>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/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()

```ts theme={null}
deleteGlobalPromptTemplate(id: string): Promise<void>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/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()

```ts theme={null}
deleteProject(projectId: string): Promise<{
  message: string;
}>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/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()

```ts theme={null}
deleteScorer(scorerId: string): Promise<DeleteScorerResponse>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/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`](/sdk-api/typescript/reference/types/type-aliases/DeleteScorerResponse)>

A promise that resolves to a response containing a success message.

***

### deleteSessions()

```ts theme={null}
deleteSessions(options: LogRecordsDeleteRequest): Promise<LogRecordsDeleteResponse>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/galileo-client.ts)

Delete sessions matching the provided filter criteria.

#### Parameters

##### options

[`LogRecordsDeleteRequest`](/sdk-api/typescript/reference/types/type-aliases/LogRecordsDeleteRequest)

Delete request object

#### Returns

`Promise`\<[`LogRecordsDeleteResponse`](/sdk-api/typescript/reference/types/type-aliases/LogRecordsDeleteResponse)>

Promise resolving to a response indicating the deletion operation result

***

### deleteSpans()

```ts theme={null}
deleteSpans(options: LogRecordsDeleteRequest): Promise<LogRecordsDeleteResponse>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/galileo-client.ts)

Delete spans matching the provided filter criteria.

#### Parameters

##### options

[`LogRecordsDeleteRequest`](/sdk-api/typescript/reference/types/type-aliases/LogRecordsDeleteRequest)

Delete request object

#### Returns

`Promise`\<[`LogRecordsDeleteResponse`](/sdk-api/typescript/reference/types/type-aliases/LogRecordsDeleteResponse)>

Promise resolving to a response indicating the deletion operation result

***

### deleteTraces()

```ts theme={null}
deleteTraces(options: LogRecordsDeleteRequest): Promise<LogRecordsDeleteResponse>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/galileo-client.ts)

Delete traces matching the provided filter criteria.

#### Parameters

##### options

[`LogRecordsDeleteRequest`](/sdk-api/typescript/reference/types/type-aliases/LogRecordsDeleteRequest)

Delete request object

#### Returns

`Promise`\<[`LogRecordsDeleteResponse`](/sdk-api/typescript/reference/types/type-aliases/LogRecordsDeleteResponse)>

Promise resolving to a response indicating the deletion operation result

***

### deleteUserProjectCollaborator()

```ts theme={null}
deleteUserProjectCollaborator(userId: string, projectId: string): Promise<void>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/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()

```ts theme={null}
exportRecords(options: LogRecordsExportRequest): Promise<AsyncIterable<string | Record<string, unknown>, any, any>>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/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`](/sdk-api/typescript/reference/types/type-aliases/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()

```ts theme={null}
extendDataset(params: SyntheticDatasetExtensionRequest): Promise<SyntheticDatasetExtensionResponse>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/galileo-client.ts)

Extends a dataset with synthetically generated data.

#### Parameters

##### params

[`SyntheticDatasetExtensionRequest`](/sdk-api/typescript/reference/README/type-aliases/SyntheticDatasetExtensionRequest)

Configuration for synthetic dataset generation.

#### Returns

`Promise`\<[`SyntheticDatasetExtensionResponse`](/sdk-api/typescript/reference/types/type-aliases/SyntheticDatasetExtensionResponse)>

A promise that resolves to the synthetic dataset extension response.

***

### getAggregatedTraceView()

```ts theme={null}
getAggregatedTraceView(options: AggregatedTraceViewRequest): Promise<AggregatedTraceViewResponse>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/galileo-client.ts)

Get an aggregated view of traces, providing a graph representation of trace relationships and patterns.

#### Parameters

##### options

[`AggregatedTraceViewRequest`](/sdk-api/typescript/reference/types/type-aliases/AggregatedTraceViewRequest)

Request object

#### Returns

`Promise`\<[`AggregatedTraceViewResponse`](/sdk-api/typescript/reference/types/type-aliases/AggregatedTraceViewResponse)>

Promise resolving to an aggregated trace view with graph data

***

### getApiUrl()

```ts theme={null}
protected getApiUrl(projectType: string): string;
```

Defined in: [src/api-client/base-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/base-client.ts)

#### Parameters

##### projectType

`string`

#### Returns

`string`

#### Inherited from

```ts theme={null}
BaseClient.getApiUrl;
```

***

### getAuthHeader()

```ts theme={null}
protected getAuthHeader(token: string): object;
```

Defined in: [src/api-client/base-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/base-client.ts)

#### Parameters

##### token

`string`

#### Returns

`object`

##### Authorization

```ts theme={null}
Authorization: string;
```

#### Inherited from

```ts theme={null}
BaseClient.getAuthHeader;
```

***

### getDataset()

```ts theme={null}
getDataset(id: string): Promise<DatasetDBType>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/galileo-client.ts)

Gets a dataset by ID.

#### Parameters

##### id

`string`

The ID of the dataset to retrieve.

#### Returns

`Promise`\<[`DatasetDBType`](/sdk-api/typescript/reference/types/type-aliases/DatasetDBType)>

A promise that resolves to the dataset.

***

### getDatasetByName()

```ts theme={null}
getDatasetByName(name: string): Promise<DatasetDBType>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/galileo-client.ts)

Gets a dataset by name.

#### Parameters

##### name

`string`

The name of the dataset to retrieve.

#### Returns

`Promise`\<[`DatasetDBType`](/sdk-api/typescript/reference/types/type-aliases/DatasetDBType)>

A promise that resolves to the dataset.

***

### getDatasetContent()

```ts theme={null}
getDatasetContent(datasetId: string): Promise<DatasetRow[]>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/galileo-client.ts)

Gets the content of a dataset.

#### Parameters

##### datasetId

`string`

The ID of the dataset.

#### Returns

`Promise`\<[`DatasetRow`](/sdk-api/typescript/reference/README/type-aliases/DatasetRow)\[]>

A promise that resolves to the rows of the dataset.

***

### getDatasetEtag()

```ts theme={null}
getDatasetEtag(id: string): Promise<string>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/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()

```ts theme={null}
getDatasets(limit?: number): Promise<DatasetDBType[]>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/galileo-client.ts)

Gets all datasets visible to the client.

#### Parameters

##### limit?

`number`

#### Returns

`Promise`\<[`DatasetDBType`](/sdk-api/typescript/reference/types/type-aliases/DatasetDBType)\[]>

A promise that resolves to the list of datasets.

***

### getDatasetVersionContent()

```ts theme={null}
getDatasetVersionContent(datasetId: string, versionIndex: number): Promise<DatasetContent>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/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`](/sdk-api/typescript/reference/README/type-aliases/DatasetContent)>

A promise that resolves to the dataset content for the specified version.

***

### getDatasetVersionHistory()

```ts theme={null}
getDatasetVersionHistory(datasetId: string): Promise<DatasetVersionHistory>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/galileo-client.ts)

Gets the version history for a dataset.

#### Parameters

##### datasetId

`string`

The ID of the dataset.

#### Returns

`Promise`\<[`DatasetVersionHistory`](/sdk-api/typescript/reference/types/type-aliases/DatasetVersionHistory)>

A promise that resolves to the version history.

***

### getExperiment()

```ts theme={null}
getExperiment(id: string): Promise<ExperimentResponseType>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/galileo-client.ts)

#### Parameters

##### id

`string`

#### Returns

`Promise`\<[`ExperimentResponseType`](/sdk-api/typescript/reference/types/type-aliases/ExperimentResponseType)>

***

### getExperimentMetrics()

```ts theme={null}
getExperimentMetrics(
   id: string,
   projectId: string,
metricsRequest: ExperimentMetricsRequest): Promise<ExperimentMetricsResponse>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/galileo-client.ts)

Gets experiment metrics.

#### Parameters

##### id

`string`

The unique identifier of the experiment.

##### projectId

`string`

##### metricsRequest

[`ExperimentMetricsRequest`](/sdk-api/typescript/reference/types/type-aliases/ExperimentMetricsRequest)

The experiment metrics request.

#### Returns

`Promise`\<[`ExperimentMetricsResponse`](/sdk-api/typescript/reference/types/type-aliases/ExperimentMetricsResponse)>

A promise that resolves to the experiment metrics response.

***

### getExperiments()

```ts theme={null}
getExperiments(): Promise<ExperimentResponseType[]>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/galileo-client.ts)

#### Returns

`Promise`\<[`ExperimentResponseType`](/sdk-api/typescript/reference/types/type-aliases/ExperimentResponseType)\[]>

***

### getExperimentsAvailableColumns()

```ts theme={null}
getExperimentsAvailableColumns(): Promise<ExperimentsAvailableColumnsResponse>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/galileo-client.ts)

Gets available columns for experiments.

#### Returns

`Promise`\<[`ExperimentsAvailableColumnsResponse`](/sdk-api/typescript/reference/types/type-aliases/ExperimentsAvailableColumnsResponse)>

A promise that resolves to the available columns response.

***

### getExperimentsPaginated()

```ts theme={null}
getExperimentsPaginated(options?: object): Promise<ListExperimentResponse>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/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`](/sdk-api/typescript/reference/types/type-aliases/ListExperimentResponse)>

A promise that resolves to the paginated experiments response.

***

### getExperimentTags()

```ts theme={null}
getExperimentTags(experimentId: string): Promise<RunTagDB[]>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/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`](/sdk-api/typescript/reference/types/type-aliases/RunTagDB)\[]>

A promise that resolves to an array of experiment tags.

***

### getExtendDatasetStatus()

```ts theme={null}
getExtendDatasetStatus(datasetId: string): Promise<JobProgress>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/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`](/sdk-api/typescript/reference/README/type-aliases/JobProgress)>

A promise that resolves to the job progress.

***

### getGlobalProjectByName()

```ts theme={null}
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](https://github.com/rungalileo/galileo-js/blob/main/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()

```ts theme={null}
getGlobalPromptTemplate(id: string): Promise<PromptTemplate>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/galileo-client.ts)

Retrieves a global prompt template by ID.

#### Parameters

##### id

`string`

Template identifier to fetch.

#### Returns

`Promise`\<[`PromptTemplate`](/sdk-api/typescript/reference/types/type-aliases/PromptTemplate)>

A promise that resolves to the prompt template payload.

***

### getGlobalPromptTemplateVersion()

```ts theme={null}
getGlobalPromptTemplateVersion(id: string, version: number): Promise<PromptTemplateVersion>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/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`](/sdk-api/typescript/reference/types/type-aliases/PromptTemplateVersion)>

A promise that resolves to the template version payload.

***

### getJob()

```ts theme={null}
getJob(jobId: string): Promise<JobDbType>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/galileo-client.ts)

#### Parameters

##### jobId

`string`

#### Returns

`Promise`\<[`JobDbType`](/sdk-api/typescript/reference/types/type-aliases/JobDbType)>

***

### getJobsForProjectRun()

```ts theme={null}
getJobsForProjectRun(projectId: string, runId: string): Promise<JobDbType[]>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/galileo-client.ts)

#### Parameters

##### projectId

`string`

##### runId

`string`

#### Returns

`Promise`\<[`JobDbType`](/sdk-api/typescript/reference/types/type-aliases/JobDbType)\[]>

***

### getLogStream()

```ts theme={null}
getLogStream(id: string): Promise<LogStreamType>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/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`](/sdk-api/typescript/reference/types/type-aliases/LogStreamType)>

A promise that resolves to the log stream.

***

### getLogStreamByName()

```ts theme={null}
getLogStreamByName(name: string): Promise<LogStreamType>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/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`](/sdk-api/typescript/reference/types/type-aliases/LogStreamType)>

A promise that resolves to the log stream.

***

### getLogStreams()

```ts theme={null}
getLogStreams(): Promise<LogStreamType[]>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/galileo-client.ts)

Lists all log streams for the project.

#### Returns

`Promise`\<[`LogStreamType`](/sdk-api/typescript/reference/types/type-aliases/LogStreamType)\[]>

A promise that resolves to an array of log streams.

***

### getProject()

```ts theme={null}
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](https://github.com/rungalileo/galileo-js/blob/main/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()

```ts theme={null}
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](https://github.com/rungalileo/galileo-js/blob/main/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()

```ts theme={null}
getProjectIdByName(name: string, projectType?: "prompt_evaluation" | "llm_monitor" | "gen_ai" | "protect"): Promise<string>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/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()

```ts theme={null}
getProjects(projectType?: "prompt_evaluation" | "llm_monitor" | "gen_ai" | "protect"): Promise<object[]>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/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()

```ts theme={null}
getPromptTemplate(id: string): Promise<PromptTemplate>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/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`](/sdk-api/typescript/reference/types/type-aliases/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()

```ts theme={null}
getPromptTemplates(): Promise<PromptTemplate[]>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/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`](/sdk-api/typescript/reference/types/type-aliases/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()

```ts theme={null}
getPromptTemplateVersion(id: string, version: number): Promise<PromptTemplateVersion>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/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`](/sdk-api/typescript/reference/types/type-aliases/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()

```ts theme={null}
getPromptTemplateVersionByName(name: string, version?: number): Promise<PromptTemplateVersion>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/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`](/sdk-api/typescript/reference/types/type-aliases/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()

```ts theme={null}
getRunScorerJobs(projectId: string, runId: string): Promise<JobDbType[]>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/galileo-client.ts)

#### Parameters

##### projectId

`string`

##### runId

`string`

#### Returns

`Promise`\<[`JobDbType`](/sdk-api/typescript/reference/types/type-aliases/JobDbType)\[]>

***

### getScorers()

```ts theme={null}
getScorers(options?: object): Promise<ScorerResponse[]>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/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`](/sdk-api/typescript/reference/types/enumerations/ScorerTypes)

(Optional) Filter by a single scorer type.

#### Returns

`Promise`\<[`ScorerResponse`](/sdk-api/typescript/reference/types/type-aliases/ScorerResponse)\[]>

A promise that resolves to an array of scorers.

***

### getScorersPage()

```ts theme={null}
getScorersPage(options?: object): Promise<ListScorersResponse>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/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`](/sdk-api/typescript/reference/types/enumerations/ScorerTypes)\[]

(Optional) Filter by scorer types.

#### Returns

`Promise`\<[`ListScorersResponse`](/sdk-api/typescript/reference/types/type-aliases/ListScorersResponse)>

A promise that resolves to an object containing scorers and the next starting token.

***

### getScorersPageByIds()

```ts theme={null}
getScorersPageByIds(options: object): Promise<ListScorersResponse>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/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`](/sdk-api/typescript/reference/types/type-aliases/ListScorersResponse)>

***

### getScorersPageByLabels()

```ts theme={null}
getScorersPageByLabels(options: object): Promise<ListScorersResponse>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/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`](/sdk-api/typescript/reference/types/type-aliases/ListScorersResponse)>

***

### getScorerVersion()

```ts theme={null}
getScorerVersion(scorerId: string, version: number): Promise<BaseScorerVersionResponse>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/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`](/sdk-api/typescript/reference/types/type-aliases/BaseScorerVersionResponse)>

A promise that resolves to the scorer version.

***

### getSession()

```ts theme={null}
getSession(sessionId: string): Promise<ExtendedSessionRecordWithChildren>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/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`](/sdk-api/typescript/reference/types/type-aliases/ExtendedSessionRecordWithChildren)>

Promise resolving to the session record with its children

***

### getSessionsAvailableColumns()

```ts theme={null}
getSessionsAvailableColumns(options: LogRecordsAvailableColumnsRequest): Promise<LogRecordsAvailableColumnsResponse>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/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`](/sdk-api/typescript/reference/types/type-aliases/LogRecordsAvailableColumnsRequest)

Request object

#### Returns

`Promise`\<[`LogRecordsAvailableColumnsResponse`](/sdk-api/typescript/reference/types/type-aliases/LogRecordsAvailableColumnsResponse)>

Promise resolving to a response containing the available columns

***

### getSpan()

```ts theme={null}
getSpan(spanId: string): Promise<ExtendedSpanRecord>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/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`](/sdk-api/typescript/reference/types/type-aliases/ExtendedSpanRecord)>

Promise resolving to the span record

***

### getSpansAvailableColumns()

```ts theme={null}
getSpansAvailableColumns(options: LogRecordsAvailableColumnsRequest): Promise<LogRecordsAvailableColumnsResponse>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/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`](/sdk-api/typescript/reference/types/type-aliases/LogRecordsAvailableColumnsRequest)

Request object

#### Returns

`Promise`\<[`LogRecordsAvailableColumnsResponse`](/sdk-api/typescript/reference/types/type-aliases/LogRecordsAvailableColumnsResponse)>

Promise resolving to a response containing the available columns

***

### getTrace()

```ts theme={null}
getTrace(traceId: string): Promise<ExtendedTraceRecordWithChildren>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/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`](/sdk-api/typescript/reference/types/type-aliases/ExtendedTraceRecordWithChildren)>

Promise resolving to the trace record with its children

***

### getTracesAvailableColumns()

```ts theme={null}
getTracesAvailableColumns(options: LogRecordsAvailableColumnsRequest): Promise<LogRecordsAvailableColumnsResponse>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/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`](/sdk-api/typescript/reference/types/type-aliases/LogRecordsAvailableColumnsRequest)

Request object

#### Returns

`Promise`\<[`LogRecordsAvailableColumnsResponse`](/sdk-api/typescript/reference/types/type-aliases/LogRecordsAvailableColumnsResponse)>

Promise resolving to a response containing the available columns

***

### healthCheck()

```ts theme={null}
protected healthCheck(): Promise<boolean>;
```

Defined in: [src/api-client/base-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/base-client.ts)

#### Returns

`Promise`\<`boolean`>

#### Inherited from

```ts theme={null}
BaseClient.healthCheck;
```

***

### ingestSpans()

```ts theme={null}
ingestSpans(options: LogSpansIngestRequest): Promise<LogSpansIngestResponse>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/galileo-client.ts)

Ingest spans into a trace. Spans represent individual operations or steps within a trace.

#### Parameters

##### options

[`LogSpansIngestRequest`](/sdk-api/typescript/reference/types/type-aliases/LogSpansIngestRequest)

Ingest request object

#### Returns

`Promise`\<[`LogSpansIngestResponse`](/sdk-api/typescript/reference/types/type-aliases/LogSpansIngestResponse)>

Promise resolving to a response indicating the ingestion result

***

### ingestTraces()

```ts theme={null}
ingestTraces(options: LogTracesIngestRequest): Promise<LogTracesIngestResponse>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/galileo-client.ts)

#### Parameters

##### options

[`LogTracesIngestRequest`](/sdk-api/typescript/reference/README/type-aliases/LogTracesIngestRequest)

#### Returns

`Promise`\<[`LogTracesIngestResponse`](/sdk-api/typescript/reference/types/type-aliases/LogTracesIngestResponse)>

***

### ingestTracesLegacy()

```ts theme={null}
ingestTracesLegacy(traces: Trace[]): Promise<void>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/galileo-client.ts)

#### Parameters

##### traces

[`Trace`](/sdk-api/typescript/reference/types/classes/Trace)\[]

#### Returns

`Promise`\<`void`>

***

### init()

```ts theme={null}
init(params: Partial<GalileoApiClientParams>): Promise<void>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/galileo-client.ts)

#### Parameters

##### params

`Partial`\<`GalileoApiClientParams`> = `{}`

#### Returns

`Promise`\<`void`>

***

### initializeClient()

```ts theme={null}
protected initializeClient(): void;
```

Defined in: [src/api-client/base-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/base-client.ts)

#### Returns

`void`

#### Inherited from

```ts theme={null}
BaseClient.initializeClient;
```

***

### listDatasetProjects()

```ts theme={null}
listDatasetProjects(datasetId: string, limit: number): Promise<ListDatasetProjectsResponse>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/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`](/sdk-api/typescript/reference/types/type-aliases/ListDatasetProjectsResponse)>

A promise that resolves to the list of projects that use the dataset.

***

### listGlobalPromptTemplates()

#### Call Signature

```ts theme={null}
listGlobalPromptTemplates(
   nameFilter: string,
   limit: number,
startingToken: number): Promise<ListPromptTemplateResponse>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/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`](/sdk-api/typescript/reference/types/type-aliases/ListPromptTemplateResponse)>

A promise that resolves to the list response payload containing templates and pagination info.

#### Call Signature

```ts theme={null}
listGlobalPromptTemplates(options: GlobalPromptTemplateListOptions): Promise<ListPromptTemplateResponse>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/galileo-client.ts)

Lists global prompt templates using optional filters and pagination.

##### Parameters

###### options

[`GlobalPromptTemplateListOptions`](/sdk-api/typescript/reference/types/type-aliases/GlobalPromptTemplateListOptions)

(Optional) Options for the list call.

##### Returns

`Promise`\<[`ListPromptTemplateResponse`](/sdk-api/typescript/reference/types/type-aliases/ListPromptTemplateResponse)>

A promise that resolves to the list response payload.

***

### listUserProjectCollaborators()

```ts theme={null}
listUserProjectCollaborators(options?: object): Promise<{
  collaborators: object[];
  limit?: number;
  nextStartingToken?: null | number;
  paginated?: boolean;
  startingToken?: number;
}>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/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()

```ts theme={null}
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](https://github.com/rungalileo/galileo-js/blob/main/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

```ts theme={null}
BaseClient.makeRequest;
```

***

### makeRequestRaw()

```ts theme={null}
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](https://github.com/rungalileo/galileo-js/blob/main/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

```ts theme={null}
BaseClient.makeRequestRaw;
```

***

### makeRequestWithConversion()

```ts theme={null}
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](https://github.com/rungalileo/galileo-js/blob/main/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

```ts theme={null}
BaseClient.makeRequestWithConversion;
```

***

### makeStreamingRequest()

```ts theme={null}
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](https://github.com/rungalileo/galileo-js/blob/main/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

```ts theme={null}
BaseClient.makeStreamingRequest;
```

***

### queryDatasets()

```ts theme={null}
queryDatasets(params: ListDatasetParams, query?: object): Promise<ListDatasetResponse>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/galileo-client.ts)

Queries datasets with filters and pagination options.

#### Parameters

##### params

[`ListDatasetParams`](/sdk-api/typescript/reference/types/type-aliases/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`](/sdk-api/typescript/reference/README/type-aliases/ListDatasetResponse)>

A promise that resolves to the list dataset response.

***

### recomputeMetrics()

```ts theme={null}
recomputeMetrics(options: RecomputeLogRecordsMetricsRequest): Promise<unknown>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/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`](/sdk-api/typescript/reference/types/type-aliases/RecomputeLogRecordsMetricsRequest)

Request object

#### Returns

`Promise`\<`unknown`>

Promise resolving to the recomputation job result

***

### refreshTokenIfNeeded()

```ts theme={null}
protected refreshTokenIfNeeded(endpoint: Routes): Promise<void>;
```

Defined in: [src/api-client/base-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/base-client.ts)

#### Parameters

##### endpoint

`Routes`

#### Returns

`Promise`\<`void`>

#### Inherited from

```ts theme={null}
BaseClient.refreshTokenIfNeeded;
```

***

### renderPromptTemplate()

```ts theme={null}
renderPromptTemplate(
   request: RenderTemplateRequest,
   startingToken?: number,
limit?: number): Promise<RenderTemplateResponse>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/galileo-client.ts)

Renders a global prompt template using dataset or string inputs.

#### Parameters

##### request

[`RenderTemplateRequest`](/sdk-api/typescript/reference/types/type-aliases/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`](/sdk-api/typescript/reference/types/type-aliases/RenderTemplateResponse)>

A promise that resolves to the render response payload.

***

### searchMetrics()

```ts theme={null}
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](https://github.com/rungalileo/galileo-js/blob/main/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()

```ts theme={null}
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](https://github.com/rungalileo/galileo-js/blob/main/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()

```ts theme={null}
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](https://github.com/rungalileo/galileo-js/blob/main/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()

```ts theme={null}
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](https://github.com/rungalileo/galileo-js/blob/main/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()

```ts theme={null}
updateExperiment(id: string, updateRequest: ExperimentUpdateRequest): Promise<ExperimentResponseType>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/galileo-client.ts)

Updates an experiment.

#### Parameters

##### id

`string`

The unique identifier of the experiment.

##### updateRequest

[`ExperimentUpdateRequest`](/sdk-api/typescript/reference/types/type-aliases/ExperimentUpdateRequest)

The experiment update request.

#### Returns

`Promise`\<[`ExperimentResponseType`](/sdk-api/typescript/reference/types/type-aliases/ExperimentResponseType)>

A promise that resolves to the updated experiment.

***

### updateGlobalPromptTemplate()

```ts theme={null}
updateGlobalPromptTemplate(templateId: string, name: string): Promise<PromptTemplate>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/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`](/sdk-api/typescript/reference/types/type-aliases/PromptTemplate)>

A promise that resolves to the updated template payload.

***

### updateRunScorerSettings()

```ts theme={null}
updateRunScorerSettings(options: object): Promise<RunScorerSettingsResponse>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/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`](/sdk-api/typescript/reference/types/type-aliases/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()

```ts theme={null}
updateSpan(options: LogSpanUpdateRequest): Promise<LogSpanUpdateResponse>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/galileo-client.ts)

Update a span with new data.

#### Parameters

##### options

[`LogSpanUpdateRequest`](/sdk-api/typescript/reference/types/type-aliases/LogSpanUpdateRequest)

Update request object

#### Returns

`Promise`\<[`LogSpanUpdateResponse`](/sdk-api/typescript/reference/types/type-aliases/LogSpanUpdateResponse)>

Promise resolving to the updated span record

***

### updateTrace()

```ts theme={null}
updateTrace(options: LogTraceUpdateRequest): Promise<LogTraceUpdateResponse>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/galileo-client.ts)

Update a trace with new data.

#### Parameters

##### options

[`LogTraceUpdateRequest`](/sdk-api/typescript/reference/types/type-aliases/LogTraceUpdateRequest)

Update request object

#### Returns

`Promise`\<[`LogTraceUpdateResponse`](/sdk-api/typescript/reference/types/type-aliases/LogTraceUpdateResponse)>

Promise resolving to the updated trace record

***

### updateUserProjectCollaborator()

```ts theme={null}
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](https://github.com/rungalileo/galileo-js/blob/main/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()

```ts theme={null}
upsertExperimentTag(
   experimentId: string,
   key: string,
   value: string,
tagType: string): Promise<RunTagDB>;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/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`](/sdk-api/typescript/reference/types/type-aliases/RunTagDB)>

A promise that resolves to the created or updated tag.

***

### validateAxiosResponse()

```ts theme={null}
protected validateAxiosResponse(response: AxiosResponse): void;
```

Defined in: [src/api-client/base-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/base-client.ts)

#### Parameters

##### response

`AxiosResponse`

#### Returns

`void`

#### Inherited from

```ts theme={null}
BaseClient.validateAxiosResponse;
```

***

### validateCodeScorerAndWait()

```ts theme={null}
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](https://github.com/rungalileo/galileo-js/blob/main/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`](/sdk-api/typescript/reference/types/interfaces/ValidateRegisteredScorerResult)>

***

### getTimestampRecord()

```ts theme={null}
static getTimestampRecord(): Date;
```

Defined in: [src/api-client/galileo-client.ts](https://github.com/rungalileo/galileo-js/blob/main/src/api-client/galileo-client.ts)

#### Returns

`Date`
