mirror of
https://github.com/xtekky/gpt4free.git
synced 2026-01-06 09:13:04 -08:00
- g4f/Provider/ApiAirforce.py: replace class attr parent="Api.Airforce" with label="Api.Airforce"
- g4f/Provider/EasyChat.py: add guard after loop to raise ValueError("Failed to retrieve arguments for EasyChat.") when args is falsy
- g4f/Provider/SearXNG.py:
- add imports: from .helper import format_media_prompt; from .. import debug
- rename class attr default_url to url (SEARXNG_URL) and use cls.url in requests
- create(): add parameters prompt: str = None and language: str = "it"
- build prompt via format_media_prompt(messages, prompt); remove previous query extraction
- request params: set q to prompt and language to provided language
- pass proxy to session.get(...); replace print(...) with debug.log(...)
- on empty results, return early (remove "Nessun risultato trovato." and FinishReason("stop") yields)
- result formatting: use r.get("title") without default fallback
- g4f/Provider/__init__.py: import DuckDuckGo and Free2GPT from .deprecated.DuckDuckGo and .deprecated.Free2GPT
- g4f/Provider/deprecated/DuckDuckGo.py: update relative imports to ...typing, ..base_provider, ..helper
- g4f/Provider/deprecated/Free2GPT.py: update relative imports to ...errors, ...requests, ...typing, ..base_provider
- g4f/Provider/needs_auth/DeepSeekAPI.py: set working = False (was has_dsk)
- g4f/Provider/needs_auth/You.py: set working = False (was True); update headers["Referer"] to f"{cls.url}/api/streamingSearch"
12 lines
No EOL
347 B
Python
12 lines
No EOL
347 B
Python
from __future__ import annotations
|
|
|
|
from .template import OpenaiTemplate
|
|
from ..config import DEFAULT_MODEL
|
|
|
|
class ApiAirforce(OpenaiTemplate):
|
|
label = "Api.Airforce"
|
|
url = "https://api.airforce"
|
|
login_url = "https://panel.api.airforce/dashboard"
|
|
api_base = "https://api.airforce/v1"
|
|
working = True
|
|
active_by_default = True |