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

# 会話

> TypeScript SDK リファレンス

Conversation は、単一の `gen_ai.conversation.id` の下に複数のターンをグループ化します。Conversation 自体は OTel span ではなく、子 span に会話 ID が記録されます。

定義元: [src/genai/conversation.ts:72](https://github.com/wandb/weave/blob/8c5f077eb11c42b84000726ff20504abc728d3fb/sdks/node/src/genai/conversation.ts#L72)

<div id="accessors">
  ## アクセサー
</div>

<div id="agentname">
  ### agentName
</div>

<div id="get-signature">
  #### 取得アクセサのシグネチャ
</div>

> **get** **agentName**(): `string`

定義元: [src/genai/conversation.ts:94](https://github.com/wandb/weave/blob/8c5f077eb11c42b84000726ff20504abc728d3fb/sdks/node/src/genai/conversation.ts#L94)

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

`string`

***

<div id="attributes">
  ### 属性
</div>

<div id="get-signature">
  #### 取得アクセサのシグネチャ
</div>

> **get** **attributes**(): `Attributes`

定義元: [src/genai/conversation.ts:106](https://github.com/wandb/weave/blob/8c5f077eb11c42b84000726ff20504abc728d3fb/sdks/node/src/genai/conversation.ts#L106)

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

`Attributes`

***

<div id="conversationid">
  ### conversationId
</div>

<div id="get-signature">
  #### 取得アクセサのシグネチャ
</div>

> **get** **conversationId**(): `string`

定義元: [src/genai/conversation.ts:102](https://github.com/wandb/weave/blob/8c5f077eb11c42b84000726ff20504abc728d3fb/sdks/node/src/genai/conversation.ts#L102)

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

`string`

***

<div id="model">
  ### モデル
</div>

<div id="get-signature">
  #### 取得アクセサのシグネチャ
</div>

> **get** **model**(): `string`

定義元: [src/genai/conversation.ts:98](https://github.com/wandb/weave/blob/8c5f077eb11c42b84000726ff20504abc728d3fb/sdks/node/src/genai/conversation.ts#L98)

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

`string`

***

<div id="sessionid">
  ### sessionId
</div>

<Warning>
  **非推奨です。** 代わりに [Conversation.conversationId](#conversationid) を使用してください。
</Warning>

<div id="get-signature">
  #### 取得アクセサのシグネチャ
</div>

> **get** **sessionId**(): `string`

定義元: [src/genai/conversation.ts:111](https://github.com/wandb/weave/blob/8c5f077eb11c42b84000726ff20504abc728d3fb/sdks/node/src/genai/conversation.ts#L111)

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

`string`

<div id="methods">
  ## メソッド
</div>

<div id="end">
  ### end()
</div>

> **end**(`opts?`): `void`

定義元: [src/genai/conversation.ts:168](https://github.com/wandb/weave/blob/8c5f077eb11c42b84000726ff20504abc728d3fb/sdks/node/src/genai/conversation.ts#L168)

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

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

`SpanEndOptions`

#### 戻り値

`void`

***

<div id="startturn">
  ### startTurn()
</div>

> **startTurn**(`opts?`): [`Turn`](./turn)

この `Conversation` 内で新しい `Turn` を開始します。このターンは会話の `conversationId` を継承します。`agentName`、`agentId`、`agentDescription`、`agentVersion`、`model` が `opts` で指定されていない場合は、会話の値が使用されます。

定義元: [src/genai/conversation.ts:156](https://github.com/wandb/weave/blob/8c5f077eb11c42b84000726ff20504abc728d3fb/sdks/node/src/genai/conversation.ts#L156)

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

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

[`TurnInit`](./turninit) = `{}`

#### 戻り値

[`Turn`](./turn)

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

```ts twoslash theme={null}
// @noErrors
const turn = conversation.startTurn();
```

```ts twoslash theme={null}
// @noErrors
const turn = conversation.startTurn({
  model: 'gpt-4o',
  agentName: 'research-bot',
  agentId: 'research-bot-prod',
  agentDescription: 'Looks up facts on Wikipedia.',
  agentVersion: '1.4.2',
  userMessage: 'What is the weather in Tokyo?',
  systemInstructions: ['You are a helpful weather bot.'],
  startTime: new Date('2026-05-29T10:00:00.000Z'),
});
```
