langsmith.schemas.Attachment#

class langsmith.schemas.Attachment(mime_type: str, data: bytes)[source]#

Annotated type that will be stored as an attachment if used.

Examples

@traceable def my_function(bar: int, my_val: Attachment):

# my_val will be stored as an attachment # bar will be stored as inputs return bar

Create new instance of Attachment(mime_type, data)

Parameters:
  • mime_type (str) –

  • data (bytes) –