type hints

Use `from __future__ import annotations avoid `dict` and `list` cause "TypeErro: 'type' object is not subscriptable".

Refer to the following Stack Overflow discussions for more information:
1.
https://stackoverflow.com/questions/75202610/typeerror-type-object-is-not-subscriptable-python
2.
https://stackoverflow.com/questions/59101121/type-hint-for-a-dict-gives-typeerror-type-object-is-not-subscriptable
This commit is contained in:
msi-JunXiang 2023-09-03 16:26:26 +08:00
parent 9de43a0e95
commit 901595b10f
35 changed files with 176 additions and 45 deletions

View file

@ -1,6 +1,9 @@
from aiohttp import ClientSession
from __future__ import annotations
import json
from aiohttp import ClientSession
from ..typing import AsyncGenerator
from .base_provider import AsyncGeneratorProvider, format_prompt, get_cookies