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

# startConversation

> TypeScript SDK リファレンス

<div id="startconversation">
  # startConversation
</div>

▸ **startConversation**(`opts?`): [`Conversation`](../classes/conversation)

新しい Conversation を開始し、現在の Conversation として設定します。
以降 `startTurn` を呼び出すと、自動的にこの Conversation が使用されます。

`attributes` を渡すと、Conversation が生成するすべての
span にカスタム (semconv 以外の) 属性を付与できます。

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

| 名      | タイプ                                                  |
| :----- | :--------------------------------------------------- |
| `opts` | [`ConversationInit`](../interfaces/conversationinit) |

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

[`Conversation`](../classes/conversation)

`例`

```ts twoslash theme={null}
// @noErrors
weave.startConversation({agentName: 'research-bot'});
```

`例`

```ts twoslash theme={null}
// @noErrors
weave.startConversation({
  agentName: 'research-bot',
  conversationId: '019efa53-8a65-711c-b4c1-7c1cb72c0bb7',
  attributes: {'myagent.version': '1.23'},
});
```

<div id="defined-in">
  #### 定義元
</div>

[src/genai/api.ts:26](https://github.com/wandb/weave/blob/9591aba8a5e77309ee0858e5ba94d31c1bd7e404/sdks/node/src/genai/api.ts#L26)

***
