Skip to content

Commit 67dc8cf

Browse files
author
kqlio67
committed
Update add README.md docs/configuration.md
1 parent 85019fc commit 67dc8cf

File tree

2 files changed

+28
-28
lines changed

2 files changed

+28
-28
lines changed

README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ Explore the [Visit GPT4Free on HuggingFace Space](https://huggingface.co/spaces/
118118
```
119119

120120
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)
123123

124124
6. **(Optional) Provider Login:**
125125
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
147147
pip install -U g4f[all]
148148
```
149149

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)
152151

153152
#### Install from Source:
154153
```bash
@@ -157,8 +156,7 @@ cd gpt4free
157156
pip install -r requirements.txt
158157
```
159158

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)
162160

163161
---
164162

docs/configuration.md

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,25 @@
1-
### G4F Configuration
21

3-
#### Authentication
2+
### G4F - Configuration
3+
44

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)
611

7-
#### Cookies
812

13+
#### Authentication
14+
15+
Refer to the [G4F Authentication Setup Guide](authentication.md) for detailed instructions on setting up authentication.
16+
17+
### Cookies Configuration
918
Cookies are essential for using Meta AI and Microsoft Designer to create images.
1019
Additionally, cookies are required for the Google Gemini and WhiteRabbitNeo Provider.
1120
From Bing, ensure you have the "\_U" cookie, and from Google, all cookies starting with "\_\_Secure-1PSID" are needed.
1221

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:**
1523
```python
1624
from g4f.cookies import set_cookies
1725

@@ -23,19 +31,16 @@ set_cookies(".google.com", {
2331
"__Secure-1PSID": "cookie value"
2432
})
2533
```
26-
27-
#### Using .har and Cookie Files
28-
34+
---
35+
### HAR and Cookie Files
36+
**Using .har and Cookie Files**
2937
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.
3038

31-
#### Creating .har Files to Capture Cookies
32-
39+
**Creating .har Files to Capture Cookies**
3340
To capture cookies, you can also create `.har` files. For more details, refer to the next section.
3441

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:**
3944
```python
4045
import os.path
4146
from g4f.cookies import set_cookies_dir, read_cookie_files
@@ -49,8 +54,7 @@ read_cookie_files(cookies_dir)
4954
```
5055

5156
### 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:**
5458

5559
```
5660
Read .har file: ./har_and_cookies/you.com.har
@@ -63,8 +67,7 @@ Cookies added: 16 from .google.com
6367

6468
##### Generating a .HAR File
6569

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:**
6871
1. Navigate to https://chatgpt.com/ using your preferred web browser and log in with your credentials.
6972
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).
7073
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
7881

7982
> **Note:** Ensure that your .har file is stored securely, as it may contain sensitive information.
8083
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:**
8486

8587
**- On macOS and Linux:**
8688
```bash

0 commit comments

Comments
 (0)