Releases: xtekky/gpt4free
g4f v0.4.7.7
g4f v0.4.7.6
What's Changed
Full Changelog: 0.4.7.5...0.4.7.6
g4f v0.4.7.5
What's Changed
- Add new media selection in UI by @hlohaus in #2760
- Add HuggingFace provider provider
- Auto refresh Google Gemini cookies
- Add sources to search results
Full Changelog: 0.4.7.4...0.4.7.5
g4f v0.4.7.4
What's Changed
- Fix url download function by @hlohaus in #2744
- Update interference-api.md by @whoa-mi in #2749
- AI Provider and Model Updates: Adding New, Removing Deprecated, and Enhancing Functionality by @kqlio67 in #2739
- Fix model and provider in chat completion response by @hlohaus in #2753
New Contributors
Full Changelog: 0.4.7.3...0.4.7.4
g4f v0.4.7.3
Release Notes
This release brings several improvements and bug fixes to g4f, focusing on performance, user interface enhancements, and stability.
Key Changes:
- Performance Improvements:
- Implemented WakeLook functionality to potentially improve background task performance.
- Disabled token counting to boost overall performance.
- User Interface Enhancements:
- Added functionality to export and import settings directly within the UI.
- Made various styling improvements to enhance the user experience.
- Bug Fixes:
- Resolved bugs related to
curl_cffi
updates, ensuring better compatibility and stability.
- Resolved bugs related to
Pull Request:
Full Changelog:
Note: This release focuses on refining existing features and addressing reported issues. Users are encouraged to update to benefit from the performance and stability improvements.
g4f v0.4.7.2
g4f v0.4.7.1
g4f v0.4.7.0
What's Changed
- Improve tools support in OpenaiTemplate and GeminiPro by @hlohaus in #2734
- Update models in DDG, PerplexityLabs, Gemini
- Fix issues with curl_cffi in new versions
- Show only free providers by default
- Add mixtral_small_24b model from DDG
PydanticAI Integration with G4F Client
Quick Setup
- Patch G4F to Use PydanticAI Models
In order to use PydanticAI models with G4F, you need to apply the necessary patch to the client. This can be done by importing apply_patch from g4f.tools.pydantic_ai.
from g4f.tools.pydantic_ai import apply_patch
apply_patch()
- Create a Simple Agent
Now you are ready to create a simple agent that can interact with the LLM. The agent is initialized with a model, and you can also define a system prompt. Here's an example where a basic agent is created with the model g4f:Gemini:Gemini and a simple system prompt:
from pydantic_ai import Agent
# Define the agent
agent = Agent(
'g4f:Gemini:Gemini', # g4f:provider:model_name or g4f:model_name
system_prompt='Be concise, reply with one sentence.',
)
Read More: PydanticAI Integration with G4F Client
Full Changelog: 0.4.6.2...0.4.7.0