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

Allow sending an option without updating the messages #1574

Open
HunderlineK opened this issue Dec 25, 2024 · 0 comments
Open

Allow sending an option without updating the messages #1574

HunderlineK opened this issue Dec 25, 2024 · 0 comments

Comments

@HunderlineK
Copy link

HunderlineK commented Dec 25, 2024

Is your feature request related to a problem? Please describe.
I'd want to be able to prompt a chat history with a message without having the interaction stored in the messages

Describe the solution you'd like

  • Add an option that allows sending a message to a chat without storing it chat.send(..., { updateMessages: false})
  • In addition to a boolean, the argument could also be a function that accepts the response as an input e.g. an evaluator , in which case the messages are updated only if the function returns true, which could be useful for implementing guards

Describe alternatives you've considered

  • We can retrieve the chat messages and manually delete the unwanted interactions, but it's clunky and need careful consideration of race conditions to prevent deleting incorrect messages.
  • We can also create a separate evaluator agent that retrieves all the messages from the chat agent and then analysis them separately, but it can lead into duplication of the agent, system instructions, etc. and the chat history has to be copied around and discarded unnecessarily.

Additional context
For a use case e.g. assume a customer is chatting with a support AI agent and there is a monitoring system that periodically queries the chat history to evaluate if the customer is happy or not, and we do not want the evaluator's query and the AI agent's response to be stored in the history of the messages.

@HunderlineK HunderlineK changed the title Allow sending chats without storing the interaction Allow sending an option without updating the messages Dec 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant