> ## Documentation Index
> Fetch the complete documentation index at: https://docs.coreweave.com/llms.txt
> Use this file to discover all available pages before exploring further.

# startLLM

> Démarre un span LLM en tant qu’enfant du Turn en cours.

```typescript theme={"system"}
startLLM(opts: LLMInit): LLM
```

Appelez cette fonction sous la forme `tracing.startLLM()` après avoir importé `tracing` depuis `@coreweave/forge-sdk/agentlens`.

Démarre un span LLM en tant qu’enfant du Turn en cours. Lève une exception si aucun Turn n’est
actif.

## Paramètres

**opts** `LLMInit` *required*

Type : [`LLMInit`](https://docs.coreweave.com/fr/products/agent-lens/reference/typescript-sdk/interfaces/llminit)

## Renvoie

[`LLM`](https://docs.coreweave.com/fr/products/agent-lens/reference/typescript-sdk/classes/llm)

## Exemples

```typescript theme={"system"}
tracing.startLLM({model: 'gpt-4o-mini', providerName: 'openai'});
```

```typescript theme={"system"}
tracing.startLLM({
  model: 'gpt-4o-mini',
  providerName: 'openai',
  systemInstructions: ['You are a helpful weather bot.'],
  startTime: new Date('2026-05-29T10:00:00.000Z'),
});
```
