Add duckduckgo-search to slim requirements,

Add pass provider as model in the client,
Fix missing @property in version utils
This commit is contained in:
Heiner Lohaus 2024-11-26 16:36:45 +01:00
parent 6b48af1757
commit cab71ca8b6
9 changed files with 64 additions and 11 deletions

View file

@ -292,7 +292,7 @@ client = AsyncClient(provider=g4f.Provider.OpenaiChat)
response = await client.chat.completions.create(
model="gpt-4",
provider=g4f.Provider.Bing,
provider=g4f.Provider.CopilotAccount,
messages=[
{
"role": "user",

View file

@ -7,7 +7,7 @@ import g4f
g4f.debug.logging = True # Enable debug logging
g4f.debug.version_check = False # Disable automatic version checking
print(g4f.Provider.Bing.params) # Print supported args for Bing
print(g4f.Provider.Gemini.params) # Print supported args for Bing
# Using automatic a provider for the given model
## Streamed completion
@ -78,7 +78,7 @@ for message in response:
Image upload and generation are supported by three main providers:
- **Bing & Other GPT-4 Providers:** Utilizes Microsoft's Image Creator.
- **Microsoft Copilot & Other GPT-4 Providers:** Utilizes Microsoft's Image Creator.
- **Google Gemini:** Available for free accounts with IP addresses outside Europe.
- **OpenaiChat with GPT-4:** Accessible for users with a Plus subscription.