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

Whether to support streaming output? #35

Open
zhenxinxu opened this issue Sep 15, 2023 · 1 comment
Open

Whether to support streaming output? #35

zhenxinxu opened this issue Sep 15, 2023 · 1 comment

Comments

@zhenxinxu
Copy link

No description provided.

@msoedov
Copy link
Owner

msoedov commented Sep 15, 2023

Short answer - No.

from langchain.chat_models import ChatOpenAI
from langchain.schema import (
    HumanMessage,
)


from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler
chat = ChatOpenAI(streaming=True, callbacks=[StreamingStdOutCallbackHandler()], temperature=0)
resp = chat([HumanMessage(content="Write me a song about sparkling water.")])

Supporting streaming is possible, but right now, it does not fit the most common 99% of scenarios for this library. Let me know if you believe otherwise

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

2 participants