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

# clear_llm_context

> Remove any previously set LLM context from a Model instance.

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

<ParamField path="model" type="Model" required={true}>
  The Model instance to clear context from
</ParamField>

## Example

```python theme={null}
from strands.models.openai import OpenAIModel
from fiddler_strandsagents import set_llm_context, clear_llm_context

model = OpenAIModel(api_key="...", model_id="gpt-4")
set_llm_context(model, "RAG retrieved documents...")
# ... RAG LLM call ...
clear_llm_context(model)
# ... subsequent non-RAG LLM calls have no context ...
```
