gpt4free/docs/providers.md
kqlio67 ca2b609e82
Add support for multiple AI models and enhance agent functionality in Blackbox provider (#2484)
* refactor(g4f/Provider/Airforce.py): improve model handling and filtering

- Add hidden_models set to exclude specific models
- Add evil alias for uncensored model handling
- Extend filtering for model-specific response tokens
- Add response buffering for streamed content
- Update model fetching with error handling

* refactor(g4f/Provider/Blackbox.py): improve caching and model handling

- Add caching system for validated values with file-based storage
- Rename 'flux' model to 'ImageGeneration' and update references
- Add temperature, top_p and max_tokens parameters to generator
- Simplify HTTP headers and remove redundant options
- Add model alias mapping for ImageGeneration
- Add file system utilities for cache management

* feat(g4f/Provider/RobocodersAPI.py): add caching and error handling

- Add file-based caching system for access tokens and sessions
- Add robust error handling with specific error messages
- Add automatic dialog continuation on resource limits
- Add HTML parsing with BeautifulSoup for token extraction
- Add debug logging for error tracking
- Add timeout configuration for API requests

* refactor(g4f/Provider/DarkAI.py): update DarkAI default model and aliases

- Change default model from llama-3-405b to llama-3-70b
- Remove llama-3-405b from supported models list
- Remove llama-3.1-405b from model aliases

* feat(g4f/Provider/Blackbox2.py): add image generation support

- Add image model 'flux' with dedicated API endpoint
- Refactor generator to support both text and image outputs
- Extract headers into reusable static method
- Add type hints for AsyncGenerator return type
- Split generation logic into _generate_text and _generate_image methods
- Add ImageResponse handling for image generation results

BREAKING CHANGE: create_async_generator now returns AsyncGenerator instead of AsyncResult

* refactor(g4f/Provider/ChatGptEs.py): update ChatGptEs model configuration

- Update models list to include gpt-3.5-turbo
- Remove chatgpt-4o-latest from supported models
- Remove model_aliases mapping for gpt-4o

* feat(g4f/Provider/DeepInfraChat.py): add Accept-Language header support

- Add Accept-Language header for internationalization
- Maintain existing header configuration
- Improve request compatibility with language preferences

* refactor(g4f/Provider/needs_auth/Gemini.py): add ProviderModelMixin inheritance

- Add ProviderModelMixin to class inheritance
- Import ProviderModelMixin from base_provider
- Move BaseConversation import to base_provider imports

* refactor(g4f/Provider/Liaobots.py): update model details and aliases

- Add version suffix to o1 model IDs
- Update model aliases for o1-preview and o1-mini
- Standardize version format across model definitions

* refactor(g4f/Provider/PollinationsAI.py): enhance model support and generation

- Split generation logic into dedicated image/text methods
- Add additional text models including sur and claude
- Add width/height parameters for image generation
- Add model existence validation
- Add hasattr checks for model lists initialization

* chore(gitignore): add provider cache directory

- Add g4f/Provider/.cache to gitignore patterns

* refactor(g4f/Provider/ReplicateHome.py): update model configuration

- Update default model to gemma-2b-it
- Add default_image_model configuration
- Remove llava-13b from supported models
- Simplify request headers

* feat(g4f/models.py): expand provider and model support

- Add new providers DarkAI and PollinationsAI
- Add new models for Mistral, Flux and image generation
- Update provider lists for existing models
- Add P1 and Evil models with experimental providers

BREAKING CHANGE: Remove llava-13b model support

* refactor(Airforce): Update type hint for split_message return

- Change return type of  from  to  for consistency with import.
- Maintain overall functionality and structure of the  class.
- Ensure compatibility with type hinting standards in Python.

* refactor(g4f/Provider/Airforce.py): Update type hint for split_message return

- Change return type of 'split_message' from 'list[str]' to 'List[str]' for consistency with import.
- Maintain overall functionality and structure of the 'Airforce' class.
- Ensure compatibility with type hinting standards in Python.

* feat(g4f/Provider/RobocodersAPI.py): Add support for optional BeautifulSoup dependency

- Introduce a check for the BeautifulSoup library and handle its absence gracefully.
- Raise a  if BeautifulSoup is not installed, prompting the user to install it.
- Remove direct import of BeautifulSoup to avoid import errors when the library is missing.

* fix: Updating provider documentation and small fixes in providers

* Disabled the provider (RobocodersAPI)

* Fix: Conflicting file g4f/models.py

* Update g4f/models.py g4f/Provider/Airforce.py

* Update docs/providers-and-models.md g4f/models.py g4f/Provider/Airforce.py g4f/Provider/PollinationsAI.py

* Update docs/providers-and-models.md

* Update .gitignore

* Update g4f/models.py

* Update g4f/Provider/PollinationsAI.py

* feat(g4f/Provider/Blackbox.py): add support for additional AI models and agents

- Introduce new agent modes for Meta-Llama, Mistral, DeepSeek, DBRX, Qwen, and Nous-Hermes
- Update model aliases to include newly supported models

* Update (g4f/Provider/Blackbox.py)

* Update (g4f/Provider/Blackbox.py)

* feat(g4f/Provider/Blackbox2.py): add license key caching and validation

- Add cache file management for license key persistence
- Implement async license key extraction from JavaScript files
- Add license key validation to text generation requests
- Update type hints for async generators
- Add error handling for cache file operations

Breaking changes:
- Text generation now requires license key validation

---------

Co-authored-by: kqlio67 <>
2024-12-15 23:27:10 +01:00

24 KiB

Free

AmigoChat

Provider g4f.Provider.AmigoChat
Website amigochat.io
Status Unknown
Models gpt-4o, gpt-4o-mini, llama-3.1-405b, mistral-nemo, gemini-flash, gemma-2b, claude-3.5-sonnet, command-r-plus, qwen-2.5-72b, grok-beta (37)
Image Models (Image Generation) flux-realism, flux-pro, dall-e-3, flux-dev
Authentication
Streaming ✔️
System message ✔️
Message history ✔️

Blackbox AI

Provider g4f.Provider.Blackbox
Website blackbox.ai
Status Active
Models gpt-4, gpt-4o, llama-3.1-8b, llama-3.1-70b, llama-3.1-405b, gemini-pro, gemini-flash, claude-3.5-sonnet, blackboxai, blackboxai-pro, llama-3.3-70b, mixtral-7b, deepseek-chat, dbrx-instruct, llama-3.1-405b, qwq-32b, hermes-2-dpo (46)
Image Models (Image Generation) flux (2)
Vision (Image Upload) ✔️
Authentication
Streaming ✔️
System message ✔️
Message history ✔️

Blackbox2

Provider g4f.Provider.Blackbox2
Website blackbox.ai
Status Unknown
Models llama-3.1-70b (2)
Image Models (Image Generation) flux
Authentication
Streaming
System message ✔️
Message history ✔️

ChatGpt

Provider g4f.Provider.ChatGpt
Website chatgpt.com
Status Unknown
Models gpt-3.5-turbo, gpt-4, gpt-4-turbo, gpt-4o, gpt-4o-mini (7)
Authentication
Streaming ✔️
System message ✔️
Message history ✔️

ChatGptEs

Provider g4f.Provider.ChatGptEs
Website chatgpt.es
Status Active
Models gpt-4, gpt-4o, gpt-4o-mini (3)
Authentication
Streaming ✔️
System message ✔️
Message history ✔️

Cloudflare AI

Provider g4f.Provider.Cloudflare
Website playground.ai.cloudflare.com
Status Active
Models llama-2-7b, llama-3-8b, llama-3.1-8b, llama-3.2-1b, qwen-1.5-7b (37)
Authentication
Streaming ✔️
System message ✔️
Message history ✔️

Microsoft Copilot

Provider g4f.Provider.Copilot
Website copilot.microsoft.com
Status Active
Models gpt-4 (1)
Authentication
Streaming ✔️
System message
Message history

DuckDuckGo AI Chat

Provider g4f.Provider.DDG
Website duckduckgo.com
Status Active
Models gpt-4, gpt-4o, gpt-4o-mini, llama-3.1-70b, mixtral-8x7b, claude-3-haiku (8)
Authentication
Streaming ✔️
System message ✔️
Message history ✔️

DarkAI

Provider g4f.Provider.DarkAI
Website darkai.foundation
Status Active
Models gpt-3.5-turbo, gpt-4o, llama-3.1-70b (3)
Authentication
Streaming ✔️
System message ✔️
Message history ✔️

Flux (HuggingSpace)

Provider g4f.Provider.Flux
Website black-forest-labs-flux-1-dev.hf.space
Status Unknown
Image Models (Image Generation) flux-dev
Authentication
Streaming ✔️
System message
Message history

Free2GPT

Provider g4f.Provider.Free2GPT
Website chat10.free2gpt.xyz
Status Active
Authentication
Streaming ✔️
System message
Message history ✔️

FreeGpt

Provider g4f.Provider.FreeGpt
Website freegptsnav.aifree.site
Status Active
Models gemini-pro (1)
Authentication
Streaming ✔️
System message ✔️
Message history ✔️

GizAI

Provider g4f.Provider.GizAI
Website app.giz.ai
Status Active
Models gemini-flash (1)
Authentication
Streaming
System message ✔️
Message history ✔️

HuggingFace

Provider g4f.Provider.HuggingFace
Website huggingface.co
Status Unknown
Models llama-3.2-11b, llama-3.3-70b, mistral-nemo, hermes-3, phi-3.5-mini, command-r-plus, qwen-2.5-72b, qwen-2.5-coder-32b, qwq-32b, nemotron-70b (11)
Image Models (Image Generation) flux-dev
Authentication
Streaming ✔️
System message
Message history ✔️

Liaobots

Provider g4f.Provider.Liaobots
Website liaobots.site
Status Unknown
Models gpt-4, gpt-4o, gpt-4o-mini, o1-preview, o1-mini, gemini-pro, gemini-flash, claude-3-opus, claude-3-sonnet, claude-3.5-sonnet, grok-beta (14)
Authentication
Streaming ✔️
System message ✔️
Message history ✔️

GPT4All

Provider g4f.Provider.Local
Website
Status Unknown
Authentication
Streaming ✔️
System message ✔️
Message history ✔️

Meta AI

Provider g4f.Provider.MetaAI
Website meta.ai
Status Unknown
Models meta-ai (1)
Authentication
Streaming ✔️
System message
Message history

Mhystical

Provider g4f.Provider.Mhystical
Website api.mhystical.cc
Status Unknown
Models gpt-4 (1)
Authentication
Streaming
System message
Message history ✔️

Ollama

Provider g4f.Provider.Ollama
Website ollama.com
Status Unknown
Authentication
Streaming ✔️
System message ✔️
Message history ✔️

OpenAI ChatGPT

Provider g4f.Provider.OpenaiChat
Website chatgpt.com
Status Active
Models gpt-4, gpt-4o, gpt-4o-mini, o1-preview, o1-mini (8)
Vision (Image Upload) ✔️
Authentication
Streaming ✔️
System message ✔️
Message history ✔️

PerplexityLabs

Provider g4f.Provider.PerplexityLabs
Website labs.perplexity.ai
Status Unknown
Models llama-3.1-8b, llama-3.1-70b, llama-3.3-70b, sonar-online, sonar-chat, lfm-40b (8)
Authentication
Streaming ✔️
System message
Message history

Pi

Provider g4f.Provider.Pi
Website pi.ai
Status Active
Authentication
Streaming ✔️
System message
Message history

Pizzagpt

Provider g4f.Provider.Pizzagpt
Website pizzagpt.it
Status Active
Models gpt-4o-mini (1)
Authentication
Streaming ✔️
System message
Message history

Pollinations AI

Provider g4f.Provider.PollinationsAI
Website pollinations.ai
Status Unknown
Models gpt-4, gpt-4o, llama-3.1-70b, mistral-nemo, mistral-large, claude-3.5-sonnet, command-r, qwen-2.5-coder-32b, p1, evil, midijourney, unity, rtist (25)
Image Models (Image Generation) flux, flux-realism, flux-cablyai, flux-anime, flux-3d, any-dark, flux-pro, turbo, midjourney, dall-e-3
Authentication
Streaming ✔️
System message ✔️
Message history ✔️

Prodia

Provider g4f.Provider.Prodia
Website app.prodia.com
Status Active
Authentication
Streaming ✔️
System message
Message history

ReplicateHome

Provider g4f.Provider.ReplicateHome
Website replicate.com
Status Active
Models gemma-2b (4)
Image Models (Image Generation) sd-3, sdxl, playground-v2.5
Authentication
Streaming ✔️
System message ✔️
Message history ✔️

Rubiks AI

Provider g4f.Provider.RubiksAI
Website rubiks.ai
Status Unknown
Models gpt-4o, gpt-4o-mini, o1-mini, llama-3.1-70b, claude-3.5-sonnet, grok-beta (8)
Authentication
Streaming ✔️
System message ✔️
Message history ✔️

TeachAnything

Provider g4f.Provider.TeachAnything
Website teach-anything.com
Status Active
Models llama-3.1-70b (1)
Authentication
Streaming ✔️
System message
Message history

TheB.AI

Provider g4f.Provider.Theb
Website beta.theb.ai
Status Unknown
Authentication
Streaming ✔️
System message
Message history

You.com

Provider g4f.Provider.You
Website you.com
Status Unknown
Models gpt-4, gpt-4-turbo, gpt-4o, gpt-4o-mini, llama-3.1-70b, claude-3-opus, claude-3-sonnet, claude-3-haiku, claude-3.5-sonnet, command-r-plus, command-r (20)
Authentication
Streaming ✔️
System message
Message history

Auth

Airforce

Provider g4f.Provider.Airforce
Website llmplayground.net
Status Unknown
Models gpt-4, gpt-4-turbo, gpt-4o, gpt-4o-mini, o1-mini, llama-2-7b, llama-3.1-8b, llama-3.1-70b, hermes-2-dpo, hermes-2-pro, phi-2, openchat-3.5, deepseek-coder, german-7b, openhermes-2.5, lfm-40b, zephyr-7b, neural-7b, evil (40)
Image Models (Image Generation) flux, flux-realism, flux-anime, flux-3d, flux-disney, flux-pixel, flux-4o, any-dark, midjourney, dall-e-3, sdxl, flux-pro
Authentication ✔️
Streaming ✔️
System message ✔️
Message history ✔️

Microsoft Designer in Bing

Provider g4f.Provider.BingCreateImages
Website bing.com
Status Unknown
Image Models (Image Generation) dall-e-3
Authentication ✔️
Streaming ✔️
System message
Message history

Cerebras Inference

Provider g4f.Provider.Cerebras
Website inference.cerebras.ai
Status Unknown
Models llama-3.1-8b, llama-3.1-70b (2)
Authentication ✔️
Streaming ✔️
System message ✔️
Message history ✔️

Microsoft Copilot

Provider g4f.Provider.CopilotAccount
Website copilot.microsoft.com
Status Active
Image Models (Image Generation) dall-e-3
Authentication ✔️
Streaming ✔️
System message
Message history

DeepInfra

Provider g4f.Provider.DeepInfra
Website deepinfra.com
Status Unknown
Authentication ✔️
Streaming ✔️
System message ✔️
Message history ✔️

DeepInfra Chat

Provider g4f.Provider.DeepInfraChat
Website deepinfra.com
Status Unknown
Models llama-3.1-8b, llama-3.1-70b, qwen-2-72b, qwen-2.5-coder-32b, qwq-32b, wizardlm-2-8x22b, nemotron-70b (7)
Authentication ✔️
Streaming ✔️
System message ✔️
Message history ✔️

DeepInfraImage

Provider g4f.Provider.DeepInfraImage
Website deepinfra.com
Status Unknown
Authentication ✔️
Streaming ✔️
System message
Message history

Google Gemini

Provider g4f.Provider.Gemini
Website gemini.google.com
Status Active
Models gemini-pro, gemini-flash (3)
Image Models (Image Generation) gemini
Authentication ✔️
Streaming ✔️
System message
Message history

Google Gemini API

Provider g4f.Provider.GeminiPro
Website ai.google.dev
Status Unknown
Models gemini-pro, gemini-flash (4)
Authentication ✔️
Streaming ✔️
System message
Message history ✔️

GigaChat

Provider g4f.Provider.GigaChat
Website developers.sber.ru
Status Unknown
Models GigaChat:latest (3)
Authentication ✔️
Streaming ✔️
System message ✔️
Message history ✔️

GithubCopilot

Provider g4f.Provider.GithubCopilot
Website github.com
Status Unknown
Models gpt-4o, o1-preview, o1-mini, claude-3.5-sonnet (4)
Authentication ✔️
Streaming ✔️
System message
Message history

Groq

Provider g4f.Provider.Groq
Website console.groq.com
Status Unknown
Models mixtral-8x7b (18)
Authentication ✔️
Streaming ✔️
System message ✔️
Message history ✔️

HuggingChat

Provider g4f.Provider.HuggingChat
Website huggingface.co
Status Active
Models llama-3.2-11b, llama-3.3-70b, mistral-nemo, hermes-3, phi-3.5-mini, command-r-plus, qwen-2.5-72b, qwen-2.5-coder-32b, qwq-32b, nemotron-70b (11)
Image Models (Image Generation) flux-dev
Authentication ✔️
Streaming ✔️
System message
Message history

HuggingFace (Inference API)

Provider g4f.Provider.HuggingFaceAPI
Website api-inference.huggingface.co
Status Unknown
Authentication ✔️
Streaming ✔️
System message ✔️
Message history ✔️

Meta AI

Provider g4f.Provider.MetaAIAccount
Website meta.ai
Status Unknown
Models meta-ai (1)
Authentication ✔️
Streaming ✔️
System message
Message history

Microsoft Designer

Provider g4f.Provider.MicrosoftDesigner
Website designer.microsoft.com
Status Active
Image Models (Image Generation) dall-e-3
Authentication ✔️
Streaming ✔️
System message
Message history

OpenAI API

Provider g4f.Provider.OpenaiAPI
Website platform.openai.com
Status Unknown
Authentication ✔️
Streaming ✔️
System message ✔️
Message history ✔️

OpenAI ChatGPT

Provider g4f.Provider.OpenaiAccount
Website chatgpt.com
Status Unknown
Models gpt-4o-mini, o1-preview, o1-mini (9)
Image Models (Image Generation) dall-e-3
Vision (Image Upload) ✔️
Authentication ✔️
Streaming ✔️
System message ✔️
Message history ✔️

Perplexity API

Provider g4f.Provider.PerplexityApi
Website perplexity.ai
Status Unknown
Authentication ✔️
Streaming ✔️
System message ✔️
Message history ✔️

Poe

Provider g4f.Provider.Poe
Website poe.com
Status Unknown
Authentication ✔️
Streaming ✔️
System message
Message history

Raycast

Provider g4f.Provider.Raycast
Website raycast.com
Status Unknown
Authentication ✔️
Streaming ✔️
System message
Message history

Reka

Provider g4f.Provider.Reka
Website chat.reka.ai
Status Unknown
Authentication ✔️
Streaming ✔️
System message
Message history

Replicate

Provider g4f.Provider.Replicate
Website replicate.com
Status Unknown
Authentication ✔️
Streaming ✔️
System message
Message history

TheB.AI API

Provider g4f.Provider.ThebApi
Website theb.ai
Status Unknown
Models gpt-3.5-turbo, gpt-4, gpt-4-turbo (21)
Authentication ✔️
Streaming ✔️
System message ✔️
Message history ✔️

WhiteRabbitNeo

Provider g4f.Provider.WhiteRabbitNeo
Website whiterabbitneo.com
Status Unknown
Authentication ✔️
Streaming ✔️
System message
Message history ✔️

Label Provider Image Model Vision Model Website
Airforce g4f.Provider.Airforce flux, flux-realism, flux-anime, flux-3d, flux-disney, flux-pixel, flux-4o, any-dark, midjourney, dall-e-3, sdxl, flux-pro llmplayground.net
AmigoChat g4f.Provider.AmigoChat flux-realism, flux-pro, dall-e-3, flux-dev amigochat.io
Microsoft Designer in Bing g4f.Provider.BingCreateImages dall-e-3 bing.com
Blackbox AI g4f.Provider.Blackbox flux ✔️ blackbox.ai
Blackbox2 g4f.Provider.Blackbox2 flux blackbox.ai
Microsoft Copilot g4f.Provider.CopilotAccount dall-e-3 copilot.microsoft.com
DeepInfraImage g4f.Provider.DeepInfraImage deepinfra.com
Flux (HuggingSpace) g4f.Provider.Flux flux-dev black-forest-labs-flux-1-dev.hf.space
Google Gemini g4f.Provider.Gemini gemini gemini.google.com
HuggingChat g4f.Provider.HuggingChat flux-dev huggingface.co
HuggingFace g4f.Provider.HuggingFace flux-dev huggingface.co
Meta AI g4f.Provider.MetaAIAccount meta.ai
Microsoft Designer g4f.Provider.MicrosoftDesigner dall-e-3 designer.microsoft.com
OpenAI ChatGPT g4f.Provider.OpenaiAccount dall-e-3, gpt-4, gpt-4o, dall-e-3 ✔️ chatgpt.com
OpenAI ChatGPT g4f.Provider.OpenaiChat ✔️ chatgpt.com
Pollinations AI g4f.Provider.PollinationsAI flux, flux-realism, flux-cablyai, flux-anime, flux-3d, any-dark, flux-pro, turbo, midjourney, dall-e-3 pollinations.ai
Prodia g4f.Provider.Prodia app.prodia.com
ReplicateHome g4f.Provider.ReplicateHome sd-3, sdxl, playground-v2.5 replicate.com
You.com g4f.Provider.You you.com