You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a42a061
Browse filesBrowse the repository at this point in the historyBrowse files
@@ -11,14 +18,7 @@ Unofficial HuggingChat Python API, extensible for chatbots etc.
11
18
12
19
> **Note**
13
20
>
14
-
> For the personal reasons, the update of this repo will become slow, and we will ensure that the most basic features can be used normally
15
-
>
16
-
>
17
-
> Recently new updates:
18
-
> - Assistant(Image Generator, etc)
19
-
> - Web search
20
-
> - Memorize context
21
-
> - Supports for changing LLMs
21
+
> For the personal reasons, the update of this repo will become slow, and we will ensure that the most basic features can be used normally. Welcome Any PR!
22
22
23
23
## Installation
24
24
```bash
@@ -29,8 +29,29 @@ pip3 install hugchat
29
29
30
30
### API
31
31
32
+
#### Minimal Example
33
+
34
+
```py
35
+
from hugchat import hugchat
36
+
from hugchat.login import Login
37
+
38
+
# Log in to huggingface and grant authorization to huggingchat
39
+
# DO NOT EXPOSE YOUR EMAIL AND PASSWORD IN CODES, USE ENVIRONMENT VARIABLES OR CONFIG FILES
40
+
EMAIL="your email"
41
+
PASSWD="your password"
42
+
cookie_path_dir ="./cookies/"#NOTE: trailing slash (/) is required to avoid errors
43
+
sign = Login(EMAIL, PASSWD)
44
+
cookies = sign.login(cookie_dir_path=cookie_path_dir, save_cookies=True)
0 commit comments