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.0.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

langchain_huggy-0.1.0-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: langchain_huggy-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 36e57f486d9ffca3e590ad3002a207189a292974cd76002f6f5c8c14c392c383
MD5 97ea3f4b036720d4711ce23f9e138f56
BLAKE2b-256 1fb4e8f146d9a3e106bc7a1a950ef4e81e74d625e3c42c8fb388fd8387cce5ab

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for langchain_huggy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6d396814737168c920b6f5143e4d715dd20e58c380c0e5c115af0d572c452a98
MD5 27c3ff25f2e828f7ff1a0879d5b6150e
BLAKE2b-256 bda13b29222f35062104eb3778c88d987cf6ed50b8c1bc0137c7907e987f325a

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