nemoguardrails.integrations.langchain.providers.huggingface
Submodules
nemoguardrails.integrations.langchain.providers.huggingface.pipelinenemoguardrails.integrations.langchain.providers.huggingface.streamers
Package Contents
Classes
API
Bases: TextStreamer
Simple async implementation for HuggingFace Transformers streamers.
This follows closely how transformers.generation.streamers.TextIteratorStreamer works, with minor modifications to make it async.
loop
text_queue
async
Put the new text in the queue. If the stream is ending, also put a stop signal in the queue.
Bases: HuggingFacePipeline
Hackish way to add backward-compatibility functions to the Langchain class. TODO: Planning to add this fix directly to Langchain repo.
async
Hackish way to add async support
Hackish way to perform a single llm call since Langchain dropped support