semantic-router icon indicating copy to clipboard operation
semantic-router copied to clipboard

How to include conversation history?

Open vdemchenko3 opened this issue 8 months ago • 3 comments

Hello!

I'm wondering how to include conversation history into a RouteLayer prediction?

Ideally I'd like to do something like:

rl = RouteLayer(encoder=encoder, routes=routes) route_with_chat_history = rl(user_message, chat_history)

Is this possible?

I see there are two notebooks that attempt this 04-chat-history.ipynb and conversation-topic-splitter.ipynb using the Messages and Conversation classes, but I'm not sure how then to use those messages/conversation in a route selection.

vdemchenko3 avatar May 29 '24 14:05 vdemchenko3