Skip to main content

The project is an unofficial API for the site huggingface.co/chat.

Project description

Project logo

HuggingChatAPI

Status GitHub last commit GitHub Issues


The project is an unofficial API for the site https://huggingface.co/chat which allows you to quickly, without a UI interface, get answers to your questions using AI hosted by huggingface.

Table of Contents

About

The project is an unofficial API for the site https://huggingface.co/chat was created using reverse engineering and site traffic analysis using BurpSuite. The developed library can be used in your projects if you need to add text-AI to your project very quickly and easily

Getting Started

You can install the library as a package via pip

pip install HuggingChatAPI

Or use the library by installing it using git

  1. Clone the repository:

    git clone https://github.com/ILYXAAA/HuggingChatAPI.git
    
  2. Install the necessary libraries:

    pip install -r requirements.txt
    

Usage

To use the library, just write a couple lines of code.

from HuggingChatAPI import SimpleHugChat

#Initializing the SimpleHugChat class
ChatBot = SimpleHugChat()

#Use the send_prompt function to send our message to the AI model
prompt = "Hello, how are you?"
model_answer = ChatBot.send_prompt(prompt)

print(model_answer)

If you run this script, you will get an example like this:

> python client.py
I am just a computer program, so I dont have feelings.

If you need any assistance or have any queries related to programming,
data science, machine learning, mathematics, or any other topic, feel free to ask.

For more information, visit: https://github.com/ILYXAAA/HuggingChatAPI

Built Using

  • HuggingFace Chat - A website hosting all the specified models
  • BurpSuite - A utility for analyzing network traffic
  • Python - The main language of the project

Author

@ILYXAAA

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

HuggingChatAPI-1.2.0.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

HuggingChatAPI-1.2.0-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file HuggingChatAPI-1.2.0.tar.gz.

File metadata

  • Download URL: HuggingChatAPI-1.2.0.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.8

File hashes

Hashes for HuggingChatAPI-1.2.0.tar.gz
Algorithm Hash digest
SHA256 251baac0d4718fe9dcf1189b7d05ce81961b17b3bd65cbd9c69a01520e610eec
MD5 d9b6884284c17ba64b47a5750a8d9bff
BLAKE2b-256 b0f5326bca190f03bd93b49c5d56e56cca481f87a4351b36e5924e256899c21d

See more details on using hashes here.

File details

Details for the file HuggingChatAPI-1.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for HuggingChatAPI-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ee12a2de677178bbbed222cf51eb149a2227b9b8f78ee2f53175af3b1dac4f8b
MD5 2746296de5791b32e99e79eaf6a7608b
BLAKE2b-256 36cb36f5f73c703f27252b733e4ad9a167e550e96a7c994880f15e0ac4faa3f8

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