Skip to main content

A LangChain integration for HuggingChat models

Project description

LangChain Huggy

A LangChain integration for HuggingChat models.

Installation

pip install langchain-huggy

Usage

from langchain_huggy import HuggingChat
from langchain_core.messages import HumanMessage

chat_model = HuggingChat()
messages = [HumanMessage(content="Tell me a joke about programming.")]
response = chat_model.generate(messages)
print(response.generations[0].message.content)

# For streaming
for chunk in chat_model.stream(messages):
    print(chunk.message.content, end="", flush=True)

License

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

langchain_huggy-0.1.2.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

langchain_huggy-0.1.2-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file langchain_huggy-0.1.2.tar.gz.

File metadata

  • Download URL: langchain_huggy-0.1.2.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.10

File hashes

Hashes for langchain_huggy-0.1.2.tar.gz
Algorithm Hash digest
SHA256 f7f0a7ccad05b615f6259a0ece27d63ba2911d4339e55f86b9566288202b8e87
MD5 69702dc2fe3e375078fb97abe20bc5b7
BLAKE2b-256 e0ba365d31d6c2e48df55c699a2e32a5794090f1bb23964bea5938ea53df05c3

See more details on using hashes here.

File details

Details for the file langchain_huggy-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for langchain_huggy-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 eb36cc3b042a242d0bb072648c95f9a8a6346b9a2eaf229ee23d308b612ad795
MD5 7316b876ae908d90feb94e048eda051e
BLAKE2b-256 b3a1fdb6b533af9625180ff56a855f4170346789ecb8e3ba3f5052a4694b0269

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page