-
Notifications
You must be signed in to change notification settings - Fork 74
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
feat: add streaming and websocket support for all chain types #8
Comments
Amazing project! My use case would be an LLM chatbot, which requires state. FastAPI supports WebSockets which might be a good solution here, or is there another approach possible? |
hi! i think it depends on how you are building the frontend but I do like the idea of adding support for websockets. It's already implemented in https://github.com/hwchase17/chat-langchain but it's better if the implementation can be added to this package as well. I will create a feature request for this. Would you like to contribute towards it? |
You mean by keeping track of history in the client? And thus sending it again at every request?
Cool!
I'll have a look if I am able to. Maybe you can point out where in your code it would fit best? |
yup yup. for example: https://github.com/mckaywrigley/chatbot-ui.
Yes sure. I think the
|
@ajndkr Sorry, but I don't have enough time for it. If I was a bit more familiar with FastAPI I'd do it, but I have only worked with Flask for APIs. |
no problem! i will look into this. will let you know once it's ready. |
Great, thanks man! |
@ajndkr can I contact you somehow? I'm struggling with something similar to your project, maybe you can help me out. |
@pors you can find me on twitter! https://twitter.com/ajndkr |
Using
I'm looking into a way to use a chat system but without using the memory since the history of messages is stored inside a database and there are different users using the chatbot. |
i added 'LLMChain' in Base Models in ['LLMChain', 'ConversationChain', 'AgentExecutor', 'RetrievalQAWithSourcesChain', 'ConversationalRetrievalChain'] |
good catch! @AmineDjeghri |
closing this issue as I currently have no future plans to add support for all chain and agent types. I will add support iteratively based on demand/popularity. |
After #6, it is evident that the
chain_wrapper_fn
logic is not generic for all chain types. There needs to be aResponse
class for each chain type. This issue will track progress.Todo:
Streaming
ConversationChain
LLMChain
LLMBashChain
LLMCheckerChain
LLMSummarizationCheckerChain
LLMMathChain
PALChain
QAWithSourcesChain
SQLDatabaseChain
SequentialChain
SimpleSequentialChain
VectorDBQA
VectorDBQAWithSourcesChain
APIChain
LLMRequestsChain
TransformChain
MapReduceChain
OpenAIModerationChain
SQLDatabaseSequentialChain
AnalyzeDocumentChain
HypotheticalDocumentEmbedder
ChatVectorDBChain
GraphQAChain
ConstitutionalChain
QAGenerationChain
RetrievalQA
RetrievalQAWithSourcesChain
ConversationalRetrievalChain
OpenAPIEndpointChain
Websocket
ConversationChain
LLMChain
LLMBashChain
LLMCheckerChain
LLMSummarizationCheckerChain
LLMMathChain
PALChain
QAWithSourcesChain
SQLDatabaseChain
SequentialChain
SimpleSequentialChain
VectorDBQA
VectorDBQAWithSourcesChain
APIChain
LLMRequestsChain
TransformChain
MapReduceChain
OpenAIModerationChain
SQLDatabaseSequentialChain
AnalyzeDocumentChain
HypotheticalDocumentEmbedder
ChatVectorDBChain
GraphQAChain
ConstitutionalChain
QAGenerationChain
RetrievalQA
RetrievalQAWithSourcesChain
ConversationalRetrievalChain
OpenAPIEndpointChain
The text was updated successfully, but these errors were encountered: