Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Openai Openai python Response Function Call Args Delta

From Leeroopedia
Knowledge Sources
Domains API_Types, Responses_API
Last Updated 2026-02-15 00:00 GMT

Overview

Concrete streaming event type emitted when there is a partial function-call arguments delta, provided by the openai-python SDK.

Description

ResponseFunctionCallArgumentsDeltaEvent is a Pydantic model representing a streaming event emitted when the model produces a partial update (delta) to the arguments of a function call. It contains a delta string with the incremental arguments data, an item_id identifying the output item, an output_index indicating the position of the output item, a sequence_number for event ordering, and a fixed type of "response.function_call_arguments.delta". This type is auto-generated from the OpenAI OpenAPI specification by Stainless.

Usage

Import ResponseFunctionCallArgumentsDeltaEvent when processing streaming events and you need to incrementally assemble function call arguments as they stream in from the model.

Code Reference

Source Location

Signature

class ResponseFunctionCallArgumentsDeltaEvent(BaseModel):
    """Emitted when there is a partial function-call arguments delta."""

    delta: str
    item_id: str
    output_index: int
    sequence_number: int
    type: Literal["response.function_call_arguments.delta"]

Import

from openai.types.responses import ResponseFunctionCallArgumentsDeltaEvent

I/O Contract

Fields

Name Type Required Description
delta str Yes The function-call arguments delta that is added.
item_id str Yes The ID of the output item that the delta is added to.
output_index int Yes The index of the output item that the delta is added to.
sequence_number int Yes The sequence number of this event.
type Literal["response.function_call_arguments.delta"] Yes The type of the event. Always "response.function_call_arguments.delta".

Usage Examples

from openai.types.responses import ResponseFunctionCallArgumentsDeltaEvent

# Accumulate function call arguments from streaming deltas
args_buffer = ""
for event in stream:
    if isinstance(event, ResponseFunctionCallArgumentsDeltaEvent):
        args_buffer += event.delta
        print(f"Arguments so far: {args_buffer}")

# Parse the complete arguments JSON
import json
arguments = json.loads(args_buffer)

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment