Skip to main content
Remove any previously set LLM context from a Model instance. After calling this function, subsequent spans created for the model will not carry gen_ai.llm.context unless it is set again via set_llm_context(). This is equivalent to set_llm_context(model, None). Works automatically in both synchronous and asynchronous contexts.

Parameters

Model
required
The Model instance to clear context from

Example