hugging-chat-api  by Soulter

Python API for HuggingChat

Created 2 years ago
932 stars

Top 39.3% on SourcePulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

This Python library provides an unofficial API for HuggingChat, enabling programmatic interaction with its chat assistant features. It's designed for developers and researchers looking to integrate advanced AI chat capabilities, including image generation, web search, and context memory, into their own applications or workflows.

How It Works

The API leverages Hugging Face authentication to establish a session, managing user cookies for persistent access. It supports both streaming and non-streaming responses, allowing for flexible integration. Key features include switching between different LLM models, managing conversation history, and interacting with specialized assistants. The library abstracts the complexities of the HuggingChat web interface, providing a clean Python interface.

Quick Start & Requirements

  • Install via pip: pip3 install hugchat
  • Requires Hugging Face account credentials (email/password) for login, ideally managed via environment variables or config files.
  • Official documentation: https://github.com/Soulter/hugging-chat-api

Highlighted Details

  • Supports basic chat, image generation, and web search functionalities.
  • Enables context memorization and switching between different LLM models.
  • Allows creation and management of multiple conversations, including interaction with specific AI assistants.
  • Offers both a Python API and a command-line interface (CLI) for interaction.

Maintenance & Community

The project is a personal endeavor, and updates may be slow. The author welcomes contributions via Pull Requests.

Licensing & Compatibility

The repository does not explicitly state a license in the provided README. This may pose compatibility issues for commercial or closed-source projects.

Limitations & Caveats

This is an unofficial project and not affiliated with Hugging Face. The author notes that updates may be infrequent due to personal reasons, though basic functionality is maintained. High-frequency API requests are discouraged due to server resource considerations.

Health Check
Last Commit

3 months ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
2 stars in the last 30 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Ishaan Jaffer Ishaan Jaffer(Cofounder of LiteLLM), and
4 more.

chathub by chathub-dev

0.1%
10k
All-in-one chatbot client
Created 2 years ago
Updated 6 months ago
Feedback? Help us improve.