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

# LLM Frames

> LLM context frame and function calling helper dataclasses

This page documents LLM-specific types that don't belong on a base-type page: `LLMContextFrame` (which inherits directly from `Frame`) and the helper dataclasses used by function calling frames. All other LLM-related frames are documented on their base-type pages. See [Related Frames](#related-frames) below for links.

## LLMContextFrame

Contains a complete LLM context. Acts as a signal to LLM services to ingest the provided context and generate a response.

Inherits directly from `Frame` (not `DataFrame`, `ControlFrame`, or `SystemFrame`).

<ParamField path="context" type="LLMContext" required>
  The LLM context containing messages, tools, and configuration.
</ParamField>

## Function Calling Helper Dataclasses

These are plain dataclasses used as fields within function calling frames, not frames themselves.

### FunctionCallFromLLM

Represents a function call returned by the LLM, ready for execution.

<ParamField path="function_name" type="str" required>
  The name of the function to call.
</ParamField>

<ParamField path="tool_call_id" type="str" required>
  A unique identifier for the function call.
</ParamField>

<ParamField path="arguments" type="Mapping[str, Any]" required>
  The arguments to pass to the function.
</ParamField>

<ParamField path="context" type="Any" required>
  The LLM context at the time the function call was made.
</ParamField>

### FunctionCallResultProperties

Configures how a function call result is handled after execution.

<ParamField path="run_llm" type="bool | None" default="None">
  Whether to run the LLM after receiving this result.
</ParamField>

<ParamField path="on_context_updated" type="Callable[[], Awaitable[None]] | None" default="None">
  Async callback to execute when the context is updated with the result.
</ParamField>

<ParamField path="is_final" type="bool" default="True">
  Whether this is the final result for the function call. Set to `False` to
  send an intermediate update from an async function call registered with
  `cancel_on_interruption=False`.
</ParamField>

## Related Frames

LLM-related frames organized by base type:

* **Data Frames**: [Context Management](/api-reference/server/frames/data-frames#llm-context-management), [Thinking](/api-reference/server/frames/data-frames#llm-thinking), [Tool Configuration](/api-reference/server/frames/data-frames#llm-tool-configuration), [Function Call Results](/api-reference/server/frames/data-frames#function-call-results)
* **Control Frames**: [Response Boundaries](/api-reference/server/frames/control-frames#llm-response-boundaries), [Context Summarization](/api-reference/server/frames/control-frames#llm-context-summarization), [Thought Frames](/api-reference/server/frames/control-frames#llm-thought-frames), [Function Calling](/api-reference/server/frames/control-frames#function-calling), [Service Settings](/api-reference/server/frames/control-frames#service-settings)
* **System Frames**: [Function Calling](/api-reference/server/frames/system-frames#function-calling)
