summaryrefslogtreecommitdiffstats
path: root/g4f/Provider
diff options
context:
space:
mode:
Diffstat (limited to 'g4f/Provider')
-rw-r--r--g4f/Provider/Bing.py6
-rw-r--r--g4f/Provider/Raycast.py2
2 files changed, 4 insertions, 4 deletions
diff --git a/g4f/Provider/Bing.py b/g4f/Provider/Bing.py
index 40e112a9..48b5477d 100644
--- a/g4f/Provider/Bing.py
+++ b/g4f/Provider/Bing.py
@@ -9,7 +9,7 @@ import aiohttp
import certifi
import requests
-from ..typing import Any, AsyncGenerator, CreateResult, Tuple
+from ..typing import Any, AsyncGenerator, CreateResult, Tuple, Union
from .base_provider import BaseProvider
@@ -79,7 +79,7 @@ def _format(msg: dict[str, Any]) -> str:
async def stream_generate(
prompt: str,
mode: dict[str, list[str]] = jailbreak,
- context: bool | str = False,
+ context: Union[bool, str] = False,
):
timeout = aiohttp.ClientTimeout(total=900)
session = aiohttp.ClientSession(timeout=timeout)
@@ -350,7 +350,7 @@ class Defaults:
}
-def run(generator: AsyncGenerator[Any | str, Any]):
+def run(generator: AsyncGenerator[Union[Any, str], Any]):
loop = asyncio.get_event_loop()
gen = generator.__aiter__()
diff --git a/g4f/Provider/Raycast.py b/g4f/Provider/Raycast.py
index 9441f629..49481202 100644
--- a/g4f/Provider/Raycast.py
+++ b/g4f/Provider/Raycast.py
@@ -2,7 +2,7 @@ import json
import requests
-from ..provider.base_provider import BaseProvider
+from ..Provider.base_provider import BaseProvider
from ..typing import Any, CreateResult