Proxy wrapper for g4f clients
Project description
This is a library for unlimited use of LLM through g4f, using a proxy! To install, install g4fp via pip and use g4f (Client with Proxy suffix) instead!
Usage example (async):
import asyncio
from g4fp import AsyncClientProxy
async def main():
client = await AsyncClientProxy()
messages = [
{"role": "user", "content": "Привет!"}
]
response = await client.chat.completions.create(
model="o1-mini",
messages=messages,
)
print(response.choices[0].message.content)
if __name__ == "__main__":
asyncio.run(main())
Usage example (sync):
from g4fp import ClientProxy
client = ClientProxy()
messages = [
{"role": "user", "content": "Привет!"}
]
response = client.chat.completions.create(
model="o1-mini",
messages=messages,
)
print(response.choices[0].message.content)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
g4fp-1.0.1.tar.gz
(14.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
g4fp-1.0.1-py3-none-any.whl
(14.7 kB
view details)
File details
Details for the file g4fp-1.0.1.tar.gz.
File metadata
- Download URL: g4fp-1.0.1.tar.gz
- Upload date:
- Size: 14.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
83059300461d1eb3f9206d7bc052ebfcd198c07b6ae3946b8bfa8485207e351d
|
|
| MD5 |
70fc8cf3cd70ec971deffc784bc8f2d5
|
|
| BLAKE2b-256 |
bcca5f3f7f6328afbfcd2850d785d3e975839292b5b44d403cf46557074c0e76
|
File details
Details for the file g4fp-1.0.1-py3-none-any.whl.
File metadata
- Download URL: g4fp-1.0.1-py3-none-any.whl
- Upload date:
- Size: 14.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a0c7ca71add767861858f8ab710259f216d2e2808d4084983804b74c3e5e7e06
|
|
| MD5 |
81e00c7069c68a8ad6dbcea70630ec3c
|
|
| BLAKE2b-256 |
0f7d8fccb82f6abf5cc85bf2d3156087bbb95549e721513e90bb2ae9cd4bf61f
|