mirror of
https://github.com/xtekky/gpt4free.git
synced 2025-10-07 01:02:52 +08:00
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:
@@ -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):
|
||||
|
Reference in New Issue
Block a user