> ## Documentation Index
> Fetch the complete documentation index at: https://wb-21fd5541-docs-1761.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Class: MessagesPrompt

> TypeScript SDK reference

[weave](../) / MessagesPrompt

## Hierarchy

* `Prompt`

  ↳ `MessagesPrompt`

## Table of contents

### Constructors

* [constructor](./messagesprompt#constructor)

### Properties

* [\_\_savedRef](./messagesprompt#__savedref)
* [messages](./messagesprompt#messages)

### Accessors

* [description](./messagesprompt#description)
* [name](./messagesprompt#name)

### Methods

* [format](./messagesprompt#format)
* [saveAttrs](./messagesprompt#saveattrs)

## Constructors

### constructor

• **new MessagesPrompt**(`parameters`): [`MessagesPrompt`](./messagesprompt)

#### Parameters

| Name         | Type                       |
| :----------- | :------------------------- |
| `parameters` | `MessagesPromptParameters` |

#### Returns

[`MessagesPrompt`](./messagesprompt)

#### Overrides

Prompt.constructor

#### Defined in

[prompt.ts:33](https://github.com/wandb/weave/blob/01ba25415eecdd98ace095491cc3bdfc7f4ba384/sdks/node/src/prompt.ts#L33)

## Properties

### \_\_savedRef

• `Optional` **\_\_savedRef**: [`ObjectRef`](./objectref) | `Promise`\<[`ObjectRef`](./objectref)>

#### Inherited from

Prompt.\_\_savedRef

#### Defined in

[weaveObject.ts:49](https://github.com/wandb/weave/blob/01ba25415eecdd98ace095491cc3bdfc7f4ba384/sdks/node/src/weaveObject.ts#L49)

***

### messages

• **messages**: `Record`\<`string`, `any`>\[]

#### Defined in

[prompt.ts:31](https://github.com/wandb/weave/blob/01ba25415eecdd98ace095491cc3bdfc7f4ba384/sdks/node/src/prompt.ts#L31)

## Accessors

### description

• `get` **description**(): `undefined` | `string`

#### Returns

`undefined` | `string`

#### Inherited from

Prompt.description

#### Defined in

[weaveObject.ts:76](https://github.com/wandb/weave/blob/01ba25415eecdd98ace095491cc3bdfc7f4ba384/sdks/node/src/weaveObject.ts#L76)

***

### name

• `get` **name**(): `string`

#### Returns

`string`

#### Inherited from

Prompt.name

#### Defined in

[weaveObject.ts:72](https://github.com/wandb/weave/blob/01ba25415eecdd98ace095491cc3bdfc7f4ba384/sdks/node/src/weaveObject.ts#L72)

## Methods

### format

▸ **format**(`values?`): `Record`\<`string`, `any`>\[]

#### Parameters

| Name     | Type                       |
| :------- | :------------------------- |
| `values` | `Record`\<`string`, `any`> |

#### Returns

`Record`\<`string`, `any`>\[]

#### Defined in

[prompt.ts:60](https://github.com/wandb/weave/blob/01ba25415eecdd98ace095491cc3bdfc7f4ba384/sdks/node/src/prompt.ts#L60)

***

### saveAttrs

▸ **saveAttrs**(): `Object`

#### Returns

`Object`

#### Inherited from

Prompt.saveAttrs

#### Defined in

[weaveObject.ts:53](https://github.com/wandb/weave/blob/01ba25415eecdd98ace095491cc3bdfc7f4ba384/sdks/node/src/weaveObject.ts#L53)
