github xtekky/gpt4free v6.5.4
Release v6.5.4

21 hours ago

πŸš€ gpt4free v6.5.4 Release Notes

Welcome to gpt4free v6.5.4! This update brings enhanced stability, richer response handling, and streamlined media processing. We've refactored key providers for better error resilience and added support for advanced response types in Perplexity. A total of 3 commits and 9 files changed by hlohaus – let's dive in! πŸŽ‰

✨ New Features & Enhancements

  • πŸ”§ Refactored Copilot Provider: Improved error handling in WebSocket connections with smarter timeouts (reduced to 1s when done) and better turnstile detection for authentication. This makes Copilot more reliable under flaky networks. πŸ“‘

  • πŸ“Š Enhanced Perplexity Provider: Now yields richer response types including:

    • Sources for web results πŸ•ΈοΈ
    • Media Previews with image dimensions and YouTube embeds πŸŽ₯
    • Suggested Followups for seamless conversation flow πŸ’¬
      Perplexity just got more powerful for research and multimedia queries!
  • πŸ–ΌοΈ Streamlined Media Handling in MarkItDown & OpenaiChat:

    • Simplified MarkItDown audio processing: Better URL handling for remote files and reduced dependency on external LLM clients. Faster conversions! ⚑
    • OpenaiChat now supports temporary conversations, improved media prompts, and JSON request/response serialization. Added web search flags and better auth flows. πŸ”
  • 🌸 Simplified PollinationsAI: Removed complex follow-up tools and developer messages for cleaner text/image generation. Fixed error logging and async image fetching for more robust outputs. Images load smoother now! πŸ–ΌοΈ

πŸ› Bug Fixes & Refinements

  • API Improvements: Added rate limiting detection (HTTP 429) and "most wanted" IP tracking in the demo mode to prevent abuse. Better error responses for unauthorized requests. 🚫

  • Image Utils: Fixed media detection for HTTP URLs and data URIs – no more false positives on binary streams. πŸ“Έ

  • Response Formatting: Enhanced link rendering in sources (better title fallbacks) and image markdown (improved thumbnails with width/height attrs). Cleaner output every time! πŸ“

  • Minor Cleanups: Removed debug prints from YouTube converter and unused params in auth flows. Code is leaner and meaner. πŸ’¨

πŸ“ˆ Stats at a Glance

  • Total Changes: +73 lines added, -105 lines removed (net: -32) – efficiency boost! βš–οΈ
  • Files Touched: 9 (Providers: Copilot, Perplexity, PollinationsAI, MarkItDown, OpenaiChat; plus API, image utils, and response types)
  • Commit Date: October 31, 2025 (spooky improvements just in time! πŸ‘»)

πŸš€ Getting Started

Upgrade via pip: pip install -U g4f

Test the new Perplexity enhancements:

import g4f
response = g4f.ChatCompletion.create(
    model="gpt-4",
    provider=g4f.Provider.Perplexity,
    messages=[{"role": "user", "content": "Latest AI news?"}]
)
# Expect sources, images, and followups!

🀝 Thanks & Contributing

Shoutout to @hlohaus for the stellar commits! If you spot issues or want to contribute, check out our GitHub repo. Star us ⭐ and join the discussions!

Stay free, stay smart! πŸ†“πŸ§ 
– The gpt4free Team

Download Options

Python Package:

  • PyPI: pip install g4f==v6.5.4

Executables:

  • Windows x64: g4f-windows-v6.5.4-x64.zip
  • Linux x64: g4f-linux-v6.5.4-x64
  • Linux ARM64: g4f-linux-v6.5.4-arm64
  • macOS x64: g4f-macos-v6.5.4-x64
  • macOS ARM64: g4f-macos-v6.5.4-arm64

System Packages:

  • WinGet: winget install gpt4free

Docker:

  • docker pull hlohaus789/g4f:v6.5.4
  • docker pull hlohaus789/g4f:v6.5.4-slim

πŸ’» Having trouble with the .exe from this release?
πŸ‘‰ Check out the Windows launcher for GPT4Free instead:
πŸ”— https://github.com/gpt4free/g4f.exe πŸš€

Don't miss a new gpt4free release

NewReleases is sending notifications on new releases.