Skip to main content

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

PyPI version PyPI pyversions

Downloads

pip install hugchat-api

[!NOTE]
VERSIONS BEFORE v0.0.1.6 ARE DEPRECATED! PLEASE UPDATE TO THE LASTEST.
For documentation, please see Wiki

Lastest Change

Last update: 2023-09-30

  • Fix: summarize api removed causing endless loop
  • Feat! : ( Testing, not sure if it's working 🤨 ) System prompt injection
  • rm: Open-Assistant is removed from ListBots
  • Fix: Chatflow error not shown in Message hence hard to debug from log
  • Update: Change multiple type hints to Union to adapt lower python version #87

Screenshots

Normal Chat

hugchat_normal

With Search Web

hugchat_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
--debug Open cli in with debug log type, log file can be found with the name: terminal_cli.log

Commands

Use / + command to execute:

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
pro Provide prompt for System

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


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

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hugchat_api-0.0.2.5-py3-none-any.whl (36.2 kB view details)

Uploaded Python 3

File details

Details for the file hugchat_api-0.0.2.5.tar.gz.

File metadata

  • Download URL: hugchat_api-0.0.2.5.tar.gz
  • Upload date:
  • Size: 31.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for hugchat_api-0.0.2.5.tar.gz
Algorithm Hash digest
SHA256 4f11a3888f18380968476b0c547967739dab21716ce34ad94a0d1b01238b9672
MD5 4252f7e45d18d084bfdcf42351e0e7d8
BLAKE2b-256 38380e82db1e36d821466191f3a9e04b50c3f8947590962b07f27aa3fafcde93

See more details on using hashes here.

File details

Details for the file hugchat_api-0.0.2.5-py3-none-any.whl.

File metadata

  • Download URL: hugchat_api-0.0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 36.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for hugchat_api-0.0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 978e17194f3bcf9bb59059557438e42a1e5f2a95c72ad12b0345ea08505b7be0
MD5 0115f7bbee009a89c79ea6787aa7a17d
BLAKE2b-256 d348522729e38137d4f0dd702eeaf9e73a7dda3fc8031b576d05d0d09d35c84e

See more details on using hashes here.

Supported by

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