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

# endSession

> TypeScript SDK reference

<Warning>
  **Deprecated.** Use [endConversation](../functions/endconversation) instead.
</Warning>

> `const` **endSession**: (`opts?`) => `void` = `endConversation`

End the current Conversation. No-op if no Conversation is active.

Defined in: [src/genai/api.ts:169](https://github.com/wandb/weave/blob/7c9efdc9fe05ffcaf2430dd652ef9bc5b3ffdfaa/sdks/node/src/genai/api.ts#L169)

## Parameters

### opts?

#### endTime?

`TimeInput`

#### error?

`Error`

## Returns

`void`

## Examples

```ts twoslash theme={null}
// @noErrors
weave.endConversation();
```

```ts twoslash theme={null}
// @noErrors
weave.endConversation({endTime: new Date('2026-05-29T10:00:01.700Z')});
```
