Open abidlabs opened 5 months ago
I realized that this is actually not as advantageous as I thought. The main bottleneck when using gr.ChatInterface
is that the history needs to be converted from the format it is stored by the gr.Chatbot
to a format that is acceptable by openai/langchain. We could make the switch but then we'd be pretty vendor-specific and it would not be backwards-compatible.
See code examples here: https://www.gradio.app/guides/creating-a-chatbot-fast#a-langchain-example
Let's close this issue as I don't see a way to do a closer integration in a backwards-compatible way.
Reopening to see if there's any way we could support both: cc @dawoodkhan82 @pngwn
The
openai
spec for chatbots has become the standard for llms, we should support messages in that format (which is essentially a list of dictionaries) for thegr.Chatbot
.