A library for unlimited use of LLM through g4f, using a proxy
Project description
g4fp
This is a library for unlimited use of LLM through g4f, using a proxy
Installation:
pip install g4fp
Now you can pass debug (bool) ClientProxy and AsyncClientProxy
Usage example (async):
import asyncio
from fp.fp import FreeProxy
from g4fp import AsyncClientProxy
async def main():
client = await AsyncClientProxy(debug=False)
messages = [
{"role": "user", "content": "Hello!"}
]
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(debug=True)
messages = [
{"role": "user", "content": "Hello!"}
]
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.1.8.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.1.8-py3-none-any.whl
(14.9 kB
view details)
File details
Details for the file g4fp-1.1.8.tar.gz.
File metadata
- Download URL: g4fp-1.1.8.tar.gz
- Upload date:
- Size: 14.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8adc6cc77edd85fbbf415e5cf4a43e9d7b881fca6827997f4f5eb84bc2c34d00
|
|
| MD5 |
95d05876a81afeb0aeddef321730b22c
|
|
| BLAKE2b-256 |
82977f5633d52828249e83e06296744aee4b0cb977e17e8e8fae4dc8eb1ae41a
|
File details
Details for the file g4fp-1.1.8-py3-none-any.whl.
File metadata
- Download URL: g4fp-1.1.8-py3-none-any.whl
- Upload date:
- Size: 14.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43fee1f656015e205b313ac3f2fa929fdd33e286f7bf24df956cc48e11979408
|
|
| MD5 |
c84e9d7cd665bd1aa1447d063a2c4bb9
|
|
| BLAKE2b-256 |
019e86a5556e442c0859a39384761e3ac2a96dafd5c338e222e1c61fc8278ce2
|