Skip to content

Conversation

@hopessugar
Copy link

Closes #895.

This PR updates contents_record() and contents_replay() to automatically handle lists of turns/objects. This simplifies saving and loading chat history by removing the need for manual lapply calls, as requested.

@gadenbuie
Copy link
Collaborator

Thanks, but unfortunately, the fix for this issue is going to be more complicated. We'd need to introduce an intermediate class to ensure the general type-safety of contents_replay() and contents_record(). I mentioned this in #895 (comment) but could have been clearer that we're not wanting to follow the approach initially mentioned in the issue. I kept that code in case it's useful to someone, but it's not intended to be incorporated into ellmer as such.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants