mirror of
https://github.com/xtekky/gpt4free.git
synced 2025-12-24 13:07:53 +08:00
Update PollinationsAI login URL and fix response handling in Completions class
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import time
|
||||
import json
|
||||
import random
|
||||
import requests
|
||||
import asyncio
|
||||
@@ -34,7 +33,7 @@ DEFAULT_HEADERS = {
|
||||
class PollinationsAI(AsyncGeneratorProvider, ProviderModelMixin):
|
||||
label = "Pollinations AI 🌸"
|
||||
url = "https://pollinations.ai"
|
||||
login_url = "https://auth.pollinations.ai"
|
||||
login_url = "https://enter.pollinations.ai"
|
||||
active_by_default = True
|
||||
working = True
|
||||
supports_system_message = True
|
||||
|
||||
@@ -361,7 +361,7 @@ class Completions:
|
||||
yield chunk
|
||||
if stream:
|
||||
return raw_response(response)
|
||||
return next(raw_response())
|
||||
return next(raw_response(response))
|
||||
if stream:
|
||||
return fallback(response)
|
||||
return next(fallback(response))
|
||||
|
||||
Reference in New Issue
Block a user