Skip to content

contents_record() and contents_replay() could operate on list of turns #895

@gadenbuie

Description

@gadenbuie
chat$get_turns() |> ellmer::contents_record()
Run `rlang::last_trace()` to see where the error occurred.
Error in `ellmer::contents_record()`:
! Cannot record or replay a list.Only `ellmer::Content` or `ellmer::Turn` classes or subclasses are currently supported.

But it'd be very convenient to be able to round trip

first <- chat$get_turns() |> contents_record()
chat2$set_turns(contents_replay(first))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions