mirror of
https://github.com/xtekky/gpt4free.git
synced 2025-12-15 14:51:19 -08:00
Improve TypeGPT, GizAI, Goabror and LambdaChat provider
Update conversation body in OpenaiChat provider Update ThinkingProcessor in run_tools Add unittests for ThinkingProcessor Update default headers in requests module Add AuthFileMixin to base_provider
This commit is contained in:
parent
f5bdae4d8b
commit
10d32a4c5f
19 changed files with 163 additions and 406 deletions
|
|
@ -6,13 +6,11 @@ from aiohttp import ClientSession
|
|||
from ..typing import AsyncResult, Messages
|
||||
from .base_provider import AsyncGeneratorProvider, ProviderModelMixin
|
||||
from ..requests.raise_for_status import raise_for_status
|
||||
from .helper import format_prompt
|
||||
|
||||
from .helper import format_prompt, get_system_prompt
|
||||
|
||||
class Goabror(AsyncGeneratorProvider, ProviderModelMixin):
|
||||
url = "https://goabror.uz"
|
||||
api_endpoint = "https://goabror.uz/api/gpt.php"
|
||||
|
||||
working = True
|
||||
|
||||
default_model = 'gpt-4'
|
||||
|
|
@ -31,10 +29,10 @@ class Goabror(AsyncGeneratorProvider, ProviderModelMixin):
|
|||
'accept-language': 'en-US,en;q=0.9',
|
||||
'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36'
|
||||
}
|
||||
|
||||
async with ClientSession(headers=headers) as session:
|
||||
params = {
|
||||
"user": format_prompt(messages)
|
||||
"user": format_prompt(messages, include_system=False),
|
||||
"system": get_system_prompt(messages),
|
||||
}
|
||||
async with session.get(f"{cls.api_endpoint}", params=params, proxy=proxy) as response:
|
||||
await raise_for_status(response)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue