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

Uploaded Source

Built Distribution

langchain_huggy-0.1.1-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: langchain_huggy-0.1.1.tar.gz
  • Upload date:
  • Size: 4.1 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.1.tar.gz
Algorithm Hash digest
SHA256 82684915f41da2976001e13c91c8b9a12314ee2ada438234235c1bcffb630150
MD5 23cab502d794e4b8be918b4ff175dae8
BLAKE2b-256 49a802765d1f3731537944b6f8be6b7d0ef238980cb3a1f74179e6b88fddacfb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for langchain_huggy-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 eeb737f81090f227a473893d54b6e301c29316a9c090a06ecd4b674260d58c1e
MD5 f0cbb66fd7f0bf65c8d5607a3758adb3
BLAKE2b-256 edeea33a5d7135d0dfedd7388dc91504180454aba0b4ee0126f8398697813eaa

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