Skip to main content

startLLM

startLLM(opts): LLM Start an LLM span as a child of the current Turn. Throws if no Turn is active.

Parameters

NameType
optsLLMInit

Returns

LLM Example
weave.startLLM({: 'gpt-4o-mini', : 'openai'});
Example
weave.startLLM({
  : 'gpt-4o-mini',
  : 'openai',
  : new ('2026-05-29T10:00:00.000Z'),
});

Defined in

src/genai/api.ts:70