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:
hlohaus 2025-06-12 16:43:14 +02:00
parent 963c3a585e
commit 67231e8c40
3 changed files with 8 additions and 6 deletions

View file

@ -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]: