Skip to main content

Hugging Chat Python

Installation

As library

From Pypi

pip install hgchat

From Codeberg

pip install --index-url https://codeberg.org/api/packages/Bavarder/pypi/simple/ hgchat

As an interactive prompt

git clone https://codeberg.org/Bavarder/hgchat.git # or https://github.com/Bavarder/hgchat.git
cd hgchat

Usage

As library

from hgchat import HGChat
hgchat = HGChat()

r = hgchat.ask(user_input)
for i in r:
    char = i["token"]["text"]
    if char == "</s>":
        print("\n", end="")
    else:
        print(char, end="")

As an interactive prompt

python chat.py

Metadata

Release files for hgchat 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hgchat 0.1.3
File Size Uploaded
hgchat-0.1.3.tar.gz 2.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hgchat 0.1.3
File Interpreter ABI Platform
hgchat-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 5.4 kB

Release files / hgchat-0.1.3.tar.gz

Download URL hgchat-0.1.3.tar.gz
Size 2.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ac103eef866bc091af0b4c2c5097c5163868acde2a86001e526b8f1d9b7384d2
BLAKE2b-256 checksum
How to use checksums
2d1ae1d7a2cb7dc3be5e13bd82c62b44e174085d122057f485218c4d88d0cce5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.2 CPython/3.10.11 Linux/6.3.0

Release files / hgchat-0.1.3-py3-none-any.whl

Download URL hgchat-0.1.3-py3-none-any.whl
Size 2.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
25725da85864cb57abd16d9ce15c270f785b7c1073ad30470609878226b93b0b
BLAKE2b-256 checksum
How to use checksums
317be26fdbce33e2bb68ba952cb21c260792a900766b8f767f040bdfbee48d03
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.2 CPython/3.10.11 Linux/6.3.0

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page