Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider not saving chat history #130

Closed
JamesHWade opened this issue Oct 22, 2024 · 2 comments
Closed

Consider not saving chat history #130

JamesHWade opened this issue Oct 22, 2024 · 2 comments

Comments

@JamesHWade
Copy link
Contributor

This is a similar thought to #29, but maybe a bit easier to implement. In some cases, we may want to make repeated API calls without saving the history for each call. An example is Edgar Ruiz's mall package.

Preserving the usage monitoring but removing the history would be nice. What about adding a save_history param to chat()?

@hadley
Copy link
Member

hadley commented Oct 22, 2024

For now, I'd recommend setting up a base chat object and then calling $clone() before you start chatting. I'm not sure what this interface will look like long term, but it's also likely to be connected to caching (#107)

@hadley hadley closed this as completed Oct 22, 2024
@DavZim
Copy link

DavZim commented Jan 21, 2025

It would be great if we have something like this, that would make the user/developer experience a lot nicer imo:

library(ellmer)

# maybe save_chat or so is a better name ...
chat <- chat_openai(..., ephemeral = TRUE)

chat$set_ephemeral(TRUE)

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

No branches or pull requests

3 participants