> By using this repository or any code related to it, you agree to the [legal notice](LEGAL_NOTICE.md). The author is not responsible for any copies, forks, re-uploads made by other users, or anything else related to GPT4Free. This is the author's only account and repository. To prevent impersonation or irresponsible actions, please comply with the GNU GPL license this Repository uses.
- <ahref="./README-DE.md"><imgsrc="https://img.shields.io/badge/öffnen in-🇩🇪 deutsch-bleu.svg"alt="Öffnen en DE"></a>
@ -55,19 +57,35 @@ pip install -U g4f
## 🛠️ Getting Started
#### Prerequisites:
#### Docker container
1. [Download and install Python](https://www.python.org/downloads/) (Version 3.10+ is recommended).
##### Quick start:
1. [Download and install Docker](https://docs.docker.com/get-docker/)
2. Pull lastet image and run the container:
```sh
docker pull hlohaus789/g4f:latest
docker run -p 8080:80 -p 1337:1337 -p 7900:7900 --shm-size="2g" hlohaus789/g4f:latest
```
5. Open the included gui on: [http://localhost:8080/chat/](http://localhost:8080/chat/)
or set the api base in your client to: [http://localhost:1337/v1](http://localhost:1337/v1)
6. (Optional) If you need to log in to your provider, you can open the desktop in the container here: http://localhost:7900/?autoconnect=1&resize=scale&password=secret.
#### Use python package
#### Setting up the project:
##### Prerequisites:
##### Install using pypi
1. [Download and install Python](https://www.python.org/downloads/) (Version 3.10+ is recommended).
2. [Install Google Chrome](https://www.google.com/chrome/) for providers with webdriver
messages=[{"role": "user", "content": "Suggest me a name."}],
webdriver=webdriver
)
@ -272,32 +279,6 @@ for idx in range(10):
webdriver.quit()
```
##### Cookies Required
Cookies are essential for the proper functioning of some service providers. It is imperative to maintain an active session, typically achieved by logging into your account.
When running the g4f package locally, the package automatically retrieves cookies from your web browser using the `get_cookies` function. However, if you're not running it locally, you'll need to provide the cookies manually by passing them as parameters using the `cookies` parameter.
To enhance speed and overall performance, execute providers asynchronously. The total execution time will be determined by the duration of the slowest provider's execution.