# Huggingchat api
**You Star You Win A BILLION$$$(maybe,it's not impossible that it would happen)**
> This is my first pypi project. Experienced some annoying moments, but i managed to do it anyway
[](https://pypi.python.org/pypi/hugchat-api/)
[](https://pypi.python.org/pypi/hugchat-api/)
[](https://pepy.tech/project/hugchat-api)
```shell
pip install hugchat-api
```
> [!NOTE]
> **VERSIONS BEFORE `v0.0.1.6` ARE DEPRECATED! PLEASE UPDATE TO THE LASTEST.**
> For documentation, please see [Wiki](https://github.com/ogios/huggingchat-api/wiki)
## Lastest Change
- **Fix! :** response parse process (response body changed)
- **Fix! :** web search parse process (api removed)
- **Feat:** Provide stdout with `flush` that suits better for stream output
- too much changes, i forgorđź’€
## Screenshots
### Normal Chat

### With Search Web

## Terminal Usage
</summary>
### Start up
```shell
python -m hugchat_api.terminal_cli -u your_email
```
| Params | Descriptions |
|--------|-----------------------------------|
| -u | Login Email |
| -p | Use password or not (optional) |
| -f | Ignore the saved cookie and login |
### Commands
Use `/` + `command` to execute commands:
| Commands | Descriptions |
|------------|----------------------------------------|
| q/exit | Exit the program |
| ls | List all conversations |
| cd <index> | cd into the chosen conversation |
| new | Create a new conversation |
| rm <index> | delete the chosen conversation |
| old | Print out the conversation's histories |
| web | Switch 'Search Web' enable option |
Anything not start with `/` will be seen as chat message.
Example:
```text
(None) > /ls
#* Conversations established:
#
# 0. [649471fa525d2d2474973871] - Hello there! How can I help you? Let me know if you need something specific done.
# 1. [64946fb2525d2d247497382c] - Hi there! How can I assist you?
(None) > /cd 0
(647e09ccabd9de3d82d6fba0) > hi
#(user): hi
#(HFBot): ...
(647e09ccabd9de3d82d6fba0) > /web
#WEB_SEARCH is set to `True`
(647e09ccabd9de3d82d6fba0) > hi
# ...(steps about web search)
#(HFBot): ...
```
</details>
Raw data
{
"_id": null,
"home_page": "https://github.com/ogios/huggingchat-api",
"name": "hugchat-api",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "ogios",
"author_email": "2134692955@qq.com",
"download_url": "https://files.pythonhosted.org/packages/6c/32/ac7fd3f904c2757d0c9e115e111853a371ea090f5a218951741f58877d38/hugchat_api-0.0.2.1.tar.gz",
"platform": null,
"description": "# Huggingchat api\n\n**You Star You Win A BILLION$$$(maybe,it's not impossible that it would happen)**\n\n> This is my first pypi project. Experienced some annoying moments, but i managed to do it anyway\n\n[](https://pypi.python.org/pypi/hugchat-api/)\n[](https://pypi.python.org/pypi/hugchat-api/)\n\n[](https://pepy.tech/project/hugchat-api)\n\n```shell\npip install hugchat-api\n```\n\n\n> [!NOTE] \n> **VERSIONS BEFORE `v0.0.1.6` ARE DEPRECATED! PLEASE UPDATE TO THE LASTEST.** \n> For documentation, please see [Wiki](https://github.com/ogios/huggingchat-api/wiki)\n\n## Lastest Change\n- **Fix! :** response parse process (response body changed)\n- **Fix! :** web search parse process (api removed)\n- **Feat:** Provide stdout with `flush` that suits better for stream output\n- too much changes, i forgor\ud83d\udc80\n\n## Screenshots\n### Normal Chat\n\n\n### With Search Web\n\n\n\n\n\n## Terminal Usage\n\n</summary>\n\n\n### Start up\n```shell\npython -m hugchat_api.terminal_cli -u your_email\n```\n\n| Params | Descriptions |\n|--------|-----------------------------------|\n| -u | Login Email |\n| -p | Use password or not (optional) |\n| -f | Ignore the saved cookie and login |\n\n### Commands\nUse `/` + `command` to execute commands:\n\n| Commands | Descriptions |\n|------------|----------------------------------------|\n| q/exit | Exit the program |\n| ls | List all conversations |\n| cd <index> | cd into the chosen conversation |\n| new | Create a new conversation |\n| rm <index> | delete the chosen conversation |\n| old | Print out the conversation's histories |\n| web | Switch 'Search Web' enable option |\n\nAnything not start with `/` will be seen as chat message.\n\nExample:\n```text\n(None) > /ls\n#* Conversations established:\n#\n# 0. [649471fa525d2d2474973871] - Hello there! How can I help you? Let me know if you need something specific done.\n# 1. [64946fb2525d2d247497382c] - Hi there! How can I assist you?\n\n(None) > /cd 0\n(647e09ccabd9de3d82d6fba0) > hi\n#(user): hi\n#(HFBot): ...\n(647e09ccabd9de3d82d6fba0) > /web\n#WEB_SEARCH is set to `True`\n(647e09ccabd9de3d82d6fba0) > hi\n# ...(steps about web search)\n#(HFBot): ...\n```\n\n</details>\n",
"bugtrack_url": null,
"license": "GNU General Public License v3.0",
"summary": "huggingface.co/chat, 'stream' response and 'Search Web' supported. (MetaAI's new model supported)",
"version": "0.0.2.1",
"project_urls": {
"Homepage": "https://github.com/ogios/huggingchat-api",
"Wiki": "https://github.com/ogios/huggingchat-api/wiki"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b9fdd1ddda8204fbfe983dafb5895f8628a1498c1bc234737fd5c85e9b5432e1",
"md5": "2c615d15afb5828eeb8cec5d9e2906d9",
"sha256": "e90c5be71d09ca9db75350bca744bbcd1caa61ac33ba70b8146824033092b0a7"
},
"downloads": -1,
"filename": "hugchat_api-0.0.2.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2c615d15afb5828eeb8cec5d9e2906d9",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 34659,
"upload_time": "2023-09-24T12:02:00",
"upload_time_iso_8601": "2023-09-24T12:02:00.977686Z",
"url": "https://files.pythonhosted.org/packages/b9/fd/d1ddda8204fbfe983dafb5895f8628a1498c1bc234737fd5c85e9b5432e1/hugchat_api-0.0.2.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "6c32ac7fd3f904c2757d0c9e115e111853a371ea090f5a218951741f58877d38",
"md5": "f47ac601da77d542e1b07fa35a50914b",
"sha256": "d5a63352d6780c17d8b81d3d0b935ce375125d9ffdc0a7383f0070d2bc1c7ea2"
},
"downloads": -1,
"filename": "hugchat_api-0.0.2.1.tar.gz",
"has_sig": false,
"md5_digest": "f47ac601da77d542e1b07fa35a50914b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 30309,
"upload_time": "2023-09-24T12:02:02",
"upload_time_iso_8601": "2023-09-24T12:02:02.776429Z",
"url": "https://files.pythonhosted.org/packages/6c/32/ac7fd3f904c2757d0c9e115e111853a371ea090f5a218951741f58877d38/hugchat_api-0.0.2.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-09-24 12:02:02",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ogios",
"github_project": "huggingchat-api",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "aiohttp",
"specs": []
},
{
"name": "urllib3",
"specs": []
},
{
"name": "dataclasses-json",
"specs": []
},
{
"name": "wcwidth",
"specs": []
}
],
"lcname": "hugchat-api"
}