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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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