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

> TypeScript SDK リファレンス

<Warning>
  **非推奨。** 代わりに [endConversation](../functions/endconversation) を使用してください。
</Warning>

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

現在の会話を終了します。アクティブな会話がない場合は何も行いません。

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

<div id="parameters">
  ## パラメーター
</div>

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

`SpanEndOptions`

<div id="returns">
  ## 戻り値
</div>

`void`

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

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

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