Skip to main content

Unofficial Huggingface chat async wrapper for reverse engineered api

Reason this release was yanked:

outdated

Project description

Unofficial HuggingFace chat api.

Description

Hatch project Python 3.11

A simple async ready wrapper for reverse engineered API of HuggingChat.

The project has no affiliation with Hugging Face, and it is neither endorsed nor officially supported by Hugging Face. The repository owner(s) and contributors cannot be held responsible for any damages or losses resulting from the utilization of this repository or its contents. Users bear sole responsibility for their actions and any potential consequences that may ensue.

Installing

pip install hf-chat

Quickstart

import asyncio
from hf_chat import ChatCompletion

async def main():
    chat = ChatCompletion("email", "password")
    async with chat:
        await chat.create_conversation(switch_to=True)
        user_input = input('> ')
        print(await chat.ask(user_input))
        
asyncio.run(main())

Inspired by Soulter/hugging-chat-api

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

hf_chat-0.1.0.tar.gz (6.5 kB view hashes)

Uploaded Source

Built Distribution

hf_chat-0.1.0-py3-none-any.whl (5.6 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