Skip to content

Diff

Base classes

Name Children Inherits
AnnotatedObject
aclientp.schema.v2.base
A v2 object with the ``_meta`` extension point.

⋔ Inheritance diagram

graph TD
  95970870749328["tool_calls.Diff"]
  95970868359040["base.AnnotatedObject"]
  95970855946400["base.Schema"]
  95970851503232["main.BaseModel"]
  125067848591872["builtins.object"]
  95970868359040 --> 95970870749328
  95970855946400 --> 95970868359040
  95970851503232 --> 95970855946400
  125067848591872 --> 95970851503232

🛈 DocStrings

Bases: AnnotatedObject

File changes produced by a tool call.

changes is authoritative for affected paths and operations; patch optionally carries renderable text for some or all of them.

Source code in src/aclientp/schema/v2/tool_calls.py
class Diff(AnnotatedObject):
    """File changes produced by a tool call.

    ``changes`` is authoritative for affected paths and operations; ``patch`` optionally
    carries renderable text for some or all of them.
    """

    type: Literal["diff"] = Field(default="diff", init=False)

    changes: Sequence[DiffChange] = Field(min_length=1)
    """The structured file changes; at least one."""

    patch: DiffPatch | MISSING | None = MISSING
    """Renderable patch text; agents SHOULD provide it whenever feasible."""

changes class-attribute instance-attribute

changes: Sequence[DiffChange] = Field(min_length=1)

The structured file changes; at least one.

patch class-attribute instance-attribute

patch: DiffPatch | MISSING | None = MISSING

Renderable patch text; agents SHOULD provide it whenever feasible.

:fa-brands-github: Show source on GitHub