> ## Documentation Index
> Fetch the complete documentation index at: https://wb-21fd5541-docs-3071-org-scoped-api-keys.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# startConversation

> TypeScript SDK リファレンス

> **startConversation**(`opts?`): [`Conversation`](../interfaces/conversation)

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

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

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

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

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

[`ConversationInit`](../interfaces/conversationinit) = `{}`

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

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

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

```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'},
});
```
