mirror of
https://github.com/hwchase17/langchain
synced 2024-11-11 19:11:02 +00:00
93472ee9e6
This PR replaces the memory stream implementation used by the LogStreamCallbackHandler. This implementation resolves an issue in which streamed logs and streamed events originating from sync code would arrive only after the entire sync code would finish execution (rather than arriving in real time as they're generated). One example is if trying to stream tokens from an llm within a tool. If the tool was an async tool, but the llm was invoked via stream (sync variant) rather than astream (async variant), then the tokens would fail to stream in real time and would all arrived bunched up after the tool invocation completed. |
||
---|---|---|
.. | ||
__init__.py | ||
base.py | ||
context.py | ||
evaluation.py | ||
langchain_v1.py | ||
langchain.py | ||
log_stream.py | ||
memory_stream.py | ||
root_listeners.py | ||
run_collector.py | ||
schemas.py | ||
stdout.py |