mirror of
https://github.com/xtekky/gpt4free.git
synced 2025-12-15 14:51:19 -08:00
refactor: remove cache parameter and update conversation handling
- Removed the `cache` parameter from the `PollinationsAI` class in `PollinationsAI.py`. - Added a `parent_message_id` parameter to the `chat_completion` method call in the `DeepSeekAPI` class in `DeepSeekAPI.py`. - Updated the handling of `conversation` in `DeepSeekAPI.py` to yield the `conversation` object at the end of the method. - Set `conversation.parent_id` to `chunk['message_id']` when present in the response in `DeepSeekAPI.py`. - Adjusted the method signatures in `aiohttp.py` to remove unnecessary type hints for `ClientSession` and `None`.
This commit is contained in:
parent
963c3a585e
commit
67231e8c40
3 changed files with 8 additions and 6 deletions
|
|
@ -62,10 +62,10 @@ class StreamSession():
|
|||
headers=headers
|
||||
)
|
||||
|
||||
async def __aenter__(self) -> "ClientSession":
|
||||
async def __aenter__(self) -> ClientSession:
|
||||
return self.inner
|
||||
|
||||
async def __aexit__(self, **kwargs) -> None:
|
||||
async def __aexit__(self, *args, **kwargs) -> None:
|
||||
await self.inner.close()
|
||||
|
||||
def get_connector(connector: BaseConnector = None, proxy: str = None, rdns: bool = False) -> Optional[BaseConnector]:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue