New minimum requirements (#1515)

* New minimum requirements
* Add ConversationStyleOptionSets to Bing
* Add image.ImageRequest
* Improve python version support
* Improve unittests
This commit is contained in:
H Lohaus
2024-01-26 07:54:13 +01:00
committed by GitHub
parent 71d71b6512
commit feb83c168b
35 changed files with 471 additions and 284 deletions

View File

@@ -1,6 +1,10 @@
from .include import DEFAULT_MESSAGES
import asyncio
import nest_asyncio
try:
import nest_asyncio
has_nest_asyncio = True
except:
has_nest_asyncio = False
import unittest
import g4f
from g4f import ChatCompletion
@@ -39,6 +43,8 @@ class TestChatCompletionAsync(unittest.IsolatedAsyncioTestCase):
class TestChatCompletionNestAsync(unittest.IsolatedAsyncioTestCase):
def setUp(self) -> None:
if not has_nest_asyncio:
self.skipTest('"nest_asyncio" not installed')
nest_asyncio.apply()
async def test_create(self):