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
Copy file name to clipboardExpand all lines: README.md
+4-6Lines changed: 4 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -118,8 +118,8 @@ Explore the [Visit GPT4Free on HuggingFace Space](https://huggingface.co/spaces/
118
118
```
119
119
120
120
5.**Access the Client Interface:**
121
-
- To use the included client, navigate to: [http://localhost:8080/chat/](http://localhost:8080/chat/) or [http://localhost:1337/chat/](http://localhost:1337/chat/)
122
-
- Or set the API base for your client to: [http://localhost:1337/v1](http://localhost:1337/v1)
121
+
-**To use the included client, navigate to:**[http://localhost:8080/chat/](http://localhost:8080/chat/) or [http://localhost:1337/chat/](http://localhost:1337/chat/)
122
+
-**Or set the API base for your client to:**[http://localhost:1337/v1](http://localhost:1337/v1)
123
123
124
124
6.**(Optional) Provider Login:**
125
125
If required, you can access the container's desktop here: http://localhost:7900/?autoconnect=1&resize=scale&password=secret for provider login purposes.
@@ -147,8 +147,7 @@ By following these steps, you should be able to successfully install and run the
147
147
pip install -U g4f[all]
148
148
```
149
149
150
-
How do I install only parts or do disable parts?
151
-
Use partial requirements: [/docs/requirements](docs/requirements.md)
150
+
How do I install only parts or do disable parts? **Use partial requirements:**[/docs/requirements](docs/requirements.md)
152
151
153
152
#### Install from Source:
154
153
```bash
@@ -157,8 +156,7 @@ cd gpt4free
157
156
pip install -r requirements.txt
158
157
```
159
158
160
-
How do I load the project using git and installing the project requirements?
161
-
Read this tutorial and follow it step by step: [/docs/git](docs/git.md)
159
+
How do I load the project using git and installing the project requirements? **Read this tutorial and follow it step by step:**[/docs/git](docs/git.md)
Copy file name to clipboardExpand all lines: docs/configuration.md
+24-22Lines changed: 24 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,25 @@
1
-
### G4F Configuration
2
1
3
-
#### Authentication
2
+
### G4F - Configuration
3
+
4
4
5
-
Refer to the [G4F Authentication Setup Guide](docs/authentication.md) for detailed instructions on setting up authentication.
5
+
## Table of Contents
6
+
-[Authentication](#authentication)
7
+
-[Cookies Configuration](#cookies-configuration)
8
+
-[HAR and Cookie Files](#har-and-cookie-files)
9
+
-[Debug Mode](#debug-mode)
10
+
-[Proxy Configuration](#proxy-configuration)
6
11
7
-
#### Cookies
8
12
13
+
#### Authentication
14
+
15
+
Refer to the [G4F Authentication Setup Guide](authentication.md) for detailed instructions on setting up authentication.
16
+
17
+
### Cookies Configuration
9
18
Cookies are essential for using Meta AI and Microsoft Designer to create images.
10
19
Additionally, cookies are required for the Google Gemini and WhiteRabbitNeo Provider.
11
20
From Bing, ensure you have the "\_U" cookie, and from Google, all cookies starting with "\_\_Secure-1PSID" are needed.
12
21
13
-
You can pass these cookies directly to the create function or set them using the `set_cookies` method before running G4F:
14
-
22
+
**You can pass these cookies directly to the create function or set them using the `set_cookies` method before running G4F:**
15
23
```python
16
24
from g4f.cookies import set_cookies
17
25
@@ -23,19 +31,16 @@ set_cookies(".google.com", {
23
31
"__Secure-1PSID": "cookie value"
24
32
})
25
33
```
26
-
27
-
#### Using .har and Cookie Files
28
-
34
+
---
35
+
###HAR and Cookie Files
36
+
**Using .har and Cookie Files**
29
37
You can place `.har` and cookie files `.json` in the default `./har_and_cookies` directory. To export a cookie file, use the [EditThisCookie Extension](https://chromewebstore.google.com/detail/editthiscookie/fngmhnnpilhplaeedifhccceomclgfbg) available on the Chrome Web Store.
30
38
31
-
#### Creating .har Files to Capture Cookies
32
-
39
+
**Creating .har Files to Capture Cookies**
33
40
To capture cookies, you can also create `.har` files. For more details, refer to the next section.
34
41
35
-
#### Changing the Cookies Directory and Loading Cookie Files in Python
36
-
37
-
You can change the cookies directory and load cookie files in your Python environment. To set the cookies directory relative to your Python file, use the following code:
38
-
42
+
### Changing the Cookies Directory and Loading Cookie Files in Python
43
+
**You can change the cookies directory and load cookie files in your Python environment. To set the cookies directory relative to your Python file, use the following code:**
39
44
```python
40
45
import os.path
41
46
from g4f.cookies import set_cookies_dir, read_cookie_files
@@ -49,8 +54,7 @@ read_cookie_files(cookies_dir)
49
54
```
50
55
51
56
### Debug Mode
52
-
53
-
If you enable debug mode, you will see logs similar to the following:
57
+
**If you enable debug mode, you will see logs similar to the following:**
54
58
55
59
```
56
60
Read .har file: ./har_and_cookies/you.com.har
@@ -63,8 +67,7 @@ Cookies added: 16 from .google.com
63
67
64
68
##### Generating a .HAR File
65
69
66
-
To utilize the OpenaiChat provider, a .har file is required from https://chatgpt.com/. Follow the steps below to create a valid .har file:
67
-
70
+
**To utilize the OpenaiChat provider, a .har file is required from https://chatgpt.com/. Follow the steps below to create a valid .har file:**
68
71
1. Navigate to https://chatgpt.com/ using your preferred web browser and log in with your credentials.
69
72
2. Access the Developer Tools in your browser. This can typically be done by right-clicking the page and selecting "Inspect," or by pressing F12 or Ctrl+Shift+I (Cmd+Option+I on a Mac).
70
73
3. With the Developer Tools open, switch to the "Network" tab.
@@ -78,9 +81,8 @@ To utilize the OpenaiChat provider, a .har file is required from https://chatgpt
78
81
79
82
> **Note:** Ensure that your .har file is stored securely, as it may contain sensitive information.
80
83
81
-
#### Using Proxy
82
-
83
-
If you want to hide or change your IP address for the providers, you can set a proxy globally via an environment variable:
84
+
### Proxy Configuration
85
+
**If you want to hide or change your IP address for the providers, you can set a proxy globally via an environment variable:**
0 commit comments