Add experimental notice to canvas (#6349)

This commit is contained in:
Eric Zhu 2025-04-21 14:31:12 -07:00 committed by GitHub
parent 4d381d7078
commit 71363a30ec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 13 additions and 0 deletions

View File

@ -7,6 +7,11 @@ class BaseCanvas(ABC):
An abstract protocol for "canvas" objects that maintain
revision history for file-like data. Concrete subclasses
can handle text, images, structured data, etc.
.. warning::
This is an experimental API and may change in the future.
"""
@abstractmethod

View File

@ -22,6 +22,10 @@ class FileRevision:
class TextCanvas(BaseCanvas):
"""An inmemory canvas that stores *text* files with full revision history.
.. warning::
This is an experimental API and may change in the future.
Besides the original CRUDlike operations, this enhanced implementation adds:
* **apply_patch** applies patches using the ``unidiff`` library for accurate

View File

@ -20,6 +20,10 @@ class TextCanvasMemory(Memory):
A memory implementation that uses a Canvas for storing file-like content.
Inserts the current state of the canvas into the ChatCompletionContext on each turn.
.. warning::
This is an experimental API and may change in the future.
The TextCanvasMemory provides a persistent, file-like storage mechanism that can be used
by agents to read and write content. It automatically injects the current state of all files
in the canvas into the model context before each inference.