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

# getPromptTemplate

***

# Function: ~~getPromptTemplate()~~

```ts theme={null}
function getPromptTemplate(options: object): Promise<PromptTemplateVersion>;
```

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

## Parameters

### options

Lookup options.

#### id?

`string`

(Optional) Template ID to fetch.

#### name?

`string`

(Optional) Template name to resolve.

#### projectId?

`string`

(Optional) Project ID associated with template.

#### projectName?

`string`

(Optional) Project name associated with template.

#### version?

`number`

(Optional) Version number to fetch.

## Returns

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

A promise that resolves to the requested template version.

## Deprecated

Prefer `getPrompt`.

Retrieves a prompt template version using either an ID or name.
