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

# startLLM

> TypeScript SDK リファレンス

<div id="startllm">
  # startLLM
</div>

▸ **startLLM**(`opts`): [`LLM`](../classes/llm)

現在の Turn の子として、LLM span を開始します。アクティブな Turn がない場合は、例外をスローします。

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

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

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

[`LLM`](../classes/llm)

`例`

```ts twoslash theme={null}
// @noErrors
weave.startLLM({model: 'gpt-4o-mini', providerName: 'openai'});
```

`例`

```ts twoslash theme={null}
// @noErrors
weave.startLLM({
  model: 'gpt-4o-mini',
  providerName: 'openai',
  startTime: new Date('2026-05-29T10:00:00.000Z'),
});
```

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

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

***
