Proxy wrapper for g4f clients
Project description
Рто библиотека для безлимитного использования LLM через g4f, СЃ использованием РїСЂРѕРєСЃРё! Для установки установите g4fp через pip Рё используйте вместо g4f (Client СЃ суффиксом Proxy)!
Пример использования (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())
Пример использования (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
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
File details
Details for the file g4fp-1.0.0.tar.gz.
File metadata
- Download URL: g4fp-1.0.0.tar.gz
- Upload date:
- Size: 15.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aafe3377fe1ff0817ccd01cd9694e5bbf2647b8324b1eb9ffba05e2937366e06
|
|
| MD5 |
c73880a1ac4e18a123974f47d53fa027
|
|
| BLAKE2b-256 |
9f4e4dfceceb7aeb19b4564adbe31222dd167419ac5904ee5e7f3d1cb5d51635
|
File details
Details for the file g4fp-1.0.0-py3-none-any.whl.
File metadata
- Download URL: g4fp-1.0.0-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.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30e52e8a0b6605f0f4e629650ced6915b419b4817880a3c5c6e58a75f523ceba
|
|
| MD5 |
af05dd6ab267b2a45d9d89174f515e92
|
|
| BLAKE2b-256 |
3b7ef03ef417bf024c34ff46c6379e73bb5b8ba2327684c9b2107d4acecce8be
|