- Explore the g4f Documentation (unfinished): [g4f.mintlify.app](https://g4f.mintlify.app) | Contribute to the docs via: [github.com/xtekky/gpt4free-docs](https://github.com/xtekky/gpt4free-docs)
## Site Takedown
Is your site on this repository and you want to take it down ? email takedown@g4f.ai with proof it is yours and it will be removed as fast as possible. - to prevent reproduction please secure your api ; )
@ -34,13 +34,13 @@ You can always leave some feedback here: https://forms.gle/FeWV9RLEedfdkmFN6
As per the survey, here is a list of improvements to come
- [x] update the repository to include the new openai library syntax (ex: `Openai()` class) | completed, use `g4f.client.Client`
- [ ] golang implementation
- [ ] Improve Documentation (on g4f.mintlify.app)& Do video tutorials
- [] Improve the provider status list & updates
- [ ] 🚧 Improve Documentation (in /docs & Guides, Howtos,& Do video tutorials
- [x] Improve the provider status list & updates
- [ ] Tutorials on how to reverse sites to write your own wrapper (PoC only ofc)
- [ ] Improve the Bing wrapper. (might write a new wrapper in golang as it is very fast)
- [ ] Write a standard provider performance test to improve the stability
- [ ] Potential support and development of local models
- [ ] improve compatibility and error handling
- [ ] 🚧 improve compatibility and error handling
## 📚 Table of Contents
@ -49,22 +49,17 @@ As per the survey, here is a list of improvements to come
- [🛠️ Getting Started](#-getting-started)
+ [Docker container](#docker-container)
- [Quick start](#quick-start)
+ [Use python package](#use-python-package)
+ [Use python](#use-python)
- [Prerequisites](#prerequisites)
- [Install using pypi](#install-using-pypi)
+ [Docker for Developers](#docker-for-developers)
- [Install using PyPI package:](#install-using-pypi-package-)
- [Install from source:](#install-from-source-)
- [Install using Docker:](#install-using-docker-)
- [💡 Usage](#-usage)
* [The Web UI](#the-web-ui)
* [The `g4f` Package](#the-g4f-package)
+ [ChatCompletion](#chatcompletion)
- [Completion](#completion)
- [Providers](#providers)
- [Using Browser](#using-browser)
- [Async Support](#async-support)
- [Proxy and Timeout Support](#proxy-and-timeout-support)
or set the api base in your client to: [http://localhost:1337/v1](http://localhost:1337/v1)
4. (Optional) If you need to log in to a provider, you can view the desktop from the container here: http://localhost:7900/?autoconnect=1&resize=scale&password=secret.
##### Use your smartphone:
Run the Web UI on Your Smartphone:
- [/docs/guides/phone](/docs/guides/phone.md)
#### Use python
##### Prerequisites:
@ -109,18 +109,19 @@ or set the api base in your client to: [http://localhost:1337/v1](http://localho
pip install -U g4f[all]
```
Or use partial requirements.
See: [/docs/requirements](/docs/requirements.md)
How do I install only parts or do disable parts?
Use partial requirements: [/docs/requirements](/docs/requirements.md)
##### Install from source using git:
##### Install from source:
See: [/docs/git](/docs/git.md)
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)
##### Install using Docker for Developers:
##### Install using Docker:
See: [/docs/docker](/docs/docker.md)
How do I build and run composer image from source?
Use docker-compose: [/docs/docker](/docs/docker.md)
Running Python applications on your smartphone is possible with specialized apps like Pydroid. This tutorial will walk you through the process using an Android smartphone with Pydroid. Note that the steps may vary slightly for iPhone users due to differences in app names and ownership.
<palign="center">
On the first screenshot is <strong>Pydroid</strong> and on the second is the <strong>Web UI</strong> in a browser
</p>
<palign="center">
<imgsrc="/docs/guides/phone.png"/>
<imgsrc="/docs/guides/phone2.jpeg"/>
</p>
1. **Install Pydroid from the Google Play Store:**
- Navigate to the Google Play Store and search for "Pydroid 3 - IDE for Python 3" or use the following link: [Pydroid 3 - IDE for Python 3](https://play.google.com/store/apps/details/Pydroid_3_IDE_for_Python_3).
2. **Install the Pydroid Repository Plugin:**
- To enhance functionality, install the Pydroid repository plugin. Find it on the Google Play Store or use this link: [Pydroid Repository Plugin](https://play.google.com/store/apps/details?id=ru.iiec.pydroid3.quickinstallrepo).
3. **Adjust App Settings:**
- In the app settings for Pydroid, disable power-saving mode and ensure that the option to pause when not in use is also disabled. This ensures uninterrupted operation of your Python scripts.
4. **Install Required Packages:**
- Open Pip within the Pydroid app and install the necessary packages by executing the following commands:
```
pip install g4f flask pillow beautifulsoup4
```
5. **Create a New Python Script:**
- Within Pydroid, create a new Python script and input the following content:
```python
from g4f import set_cookies
set_cookies(".bing.com", {
"_U": "cookie value"
})
from g4f.gui import run_gui
run_gui("0.0.0.0", 8080, debug=True)
```
Replace `"cookie value"` with your actual cookie value from Bing if you intend to create images using Bing.
6. **Execute the Script:**
- Run the script by clicking on the play button or selecting the option to execute it.
7. **Access the GUI:**
- Wait for the server to start, and once it's running, open the GUI using the URL provided in the output. [http://localhost:8080/chat/](http://localhost:8080/chat/)
By following these steps, you can successfully run the G4F GUI on your smartphone using Pydroid, allowing you to create and interact with graphical interfaces directly from your device.