Metadata-Version: 2.1
Name: hf-chat
Version: 0.1.0
Summary: Unofficial Huggingface chat async wrapper for reverse engineered api
Project-URL: Homepage, https://github.com/LyubimovVladislav/hf-chat
Project-URL: Bug Tracker, https://github.com/LyubimovVladislav/hf-chat/issues
Author-email: Vladislav Lyubimov <grifon7676@gmail.com>
License-File: LICENSE
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.11
Requires-Dist: aiohttp
Description-Content-Type: text/markdown

# Unofficial HuggingFace chat api.

### Description

[![Hatch project](https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg)](https://github.com/pypa/hatch)
[![Python 3.11](https://img.shields.io/badge/python-3.11-blue.svg)](https://www.python.org/downloads/release/python-3113/)

A simple async ready wrapper for reverse engineered API of [HuggingChat](https://huggingface.co/chat).

<p>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.</p>

### 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())
```

<hr>

Inspired by [Soulter/hugging-chat-api](https://github.com/Soulter/hugging-chat-api)