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

> Référence du SDK TypeScript

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

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

Démarrez une nouvelle conversation et définissez-la comme conversation active.
Les appels ultérieurs à `startTurn` l’utiliseront automatiquement.

Passez `attributes` pour appliquer des attributs personnalisés (non semconv) à chaque
span émis par la conversation.

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

| Nom    | Type                                                 |
| :----- | :--------------------------------------------------- |
| `opts` | [`ConversationInit`](../interfaces/conversationinit) |

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

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

`Exemple`

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

`Exemple`

```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">
  #### Défini dans
</div>

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

***
