mirror of
https://github.com/xtekky/gpt4free.git
synced 2025-12-24 02:50:39 -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:
parent
71d71b6512
commit
feb83c168b
35 changed files with 471 additions and 284 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue