huggingface.co/chat, 'stream' response and 'Search Web' supported. (MetaAI's new model supported)
Project description
Huggingchat api
You Star You Win A BILLION$$$(maybe,it's not impossible that it would happen)
This is my first pypi project. Experienced some annoying moments, but i managed to do it anyway
pip install hugchat-api
[!NOTE]
VERSIONS BEFOREv0.0.1.6ARE DEPRECATED! PLEASE UPDATE TO THE LASTEST.
For documentation, please see Wiki
Lastest Change
- Fix! : response parse process (response body changed)
- Fix! : web search parse process (api removed)
- Feat: Provide stdout with
flushthat suits better for stream output - too much changes, i forgor💀
Screenshots
Normal Chat
With Search Web
Terminal Usage
Start up
python -m hugchat_api.terminal_cli -u your_email
| Params | Descriptions |
|---|---|
| -u | Login Email |
| -p | Use password or not (optional) |
| -f | Ignore the saved cookie and login |
Commands
Use / + command to execute commands:
| Commands | Descriptions |
|---|---|
| q/exit | Exit the program |
| ls | List all conversations |
| cd | cd into the chosen conversation |
| new | Create a new conversation |
| rm | delete the chosen conversation |
| old | Print out the conversation's histories |
| web | Switch 'Search Web' enable option |
Anything not start with / will be seen as chat message.
Example:
(None) > /ls
#* Conversations established:
#
# 0. [649471fa525d2d2474973871] - Hello there! How can I help you? Let me know if you need something specific done.
# 1. [64946fb2525d2d247497382c] - Hi there! How can I assist you?
(None) > /cd 0
(647e09ccabd9de3d82d6fba0) > hi
#(user): hi
#(HFBot): ...
(647e09ccabd9de3d82d6fba0) > /web
#WEB_SEARCH is set to `True`
(647e09ccabd9de3d82d6fba0) > hi
# ...(steps about web search)
#(HFBot): ...
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
hugchat_api-0.0.2.1.tar.gz
(30.3 kB
view hashes)
Built Distribution
Close
Hashes for hugchat_api-0.0.2.1-py3-none-any.whl
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 | e90c5be71d09ca9db75350bca744bbcd1caa61ac33ba70b8146824033092b0a7 |
|
| MD5 | 2c615d15afb5828eeb8cec5d9e2906d9 |
|
| BLAKE2b-256 | b9fdd1ddda8204fbfe983dafb5895f8628a1498c1bc234737fd5c85e9b5432e1 |