LangChain LLM Streamer
LangChain LLM Streamer is a Python package that allows you to stream and print responses from LangChain's language models in an asynchronous manner.
Installation
You can install the package using pip:
pip install langchain-llm-streamer
Usage
Here is an example of how to use the LangChain LLM Streamer:
from langchain.schema import HumanMessage, SystemMessage
from langchain_openai import ChatOpenAI
from langchain_llm_streamer import stream_print
model = ChatOpenAI(
api_key="***", # Replace with your OpenAI API key
model="gpt-3.5-turbo",
)
messages = [
SystemMessage(content="You are a friendly AI. Please respond to the user's prompt."),
HumanMessage(content="Tell me something about yourself.")
]
# Example usage
stream_print(model, messages)
Metadata
Release files for langchain-llm-streamer 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| langchain-llm-streamer-0.1.1.tar.gz | 1.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| langchain_llm_streamer-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 4.3 kB
Release files / langchain-llm-streamer-0.1.1.tar.gz
| Download URL | langchain-llm-streamer-0.1.1.tar.gz |
|---|---|
| Size | 1.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
025ff8ca76734891a732910f76174487b388d4a170d14a0b315fd786b47fafca
|
|
BLAKE2b-256 checksum How to use checksums |
748e1463a820acebd2303ca9245a297ed4b404d36a72f8e67363c791630d8cd2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.0
|
Release files / langchain_llm_streamer-0.1.1-py3-none-any.whl
| Download URL | langchain_llm_streamer-0.1.1-py3-none-any.whl |
|---|---|
| Size | 2.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
45b8375142084f93dc436fabbdbb8bbea82d802c9717a9292802511ebb356b33
|
|
BLAKE2b-256 checksum How to use checksums |
c83a902674ac16a61b477ffb4a425f6952647966f1c6752d399b8bc956dfe56a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.0
|
Security for langchain-llm-streamer 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.