> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wandb.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# endSession

> Référence du SDK TypeScript

<Warning>
  **Obsolète.** Utilisez plutôt [endConversation](../functions/endconversation).
</Warning>

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

Met fin à la conversation actuelle. Aucune opération n’est effectuée si aucune conversation n’est active.

Défini dans : [src/genai/api.ts:169](https://github.com/wandb/weave/blob/8c5f077eb11c42b84000726ff20504abc728d3fb/sdks/node/src/genai/api.ts#L169)

<div id="parameters">
  ## Paramètres
</div>

<div id="opts">
  ### opts ?
</div>

`SpanEndOptions`

<div id="returns">
  ## Renvoie
</div>

`void`

<div id="examples">
  ## Exemples
</div>

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

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