返回提交历史
Modified
etc/unittest/integration.py
+1
-8
XFEstudio/gpt4free
.
0c4d218c
代码差异
1 个文件
+1
-8
@@ -8,7 +8,7 @@ except ImportError:
8
8
has_nest_asyncio = False
9
9
10
10
from g4f.client import Client, ChatCompletion
11
from g4f.Provider import Bing, OpenaiChat, DuckDuckGo
11
from g4f.Provider import Bing, OpenaiChat
12
12
13
13
DEFAULT_MESSAGES = [{"role": "system", "content": 'Response in json, Example: {"success": false}'},
14
14
{"role": "user", "content": "Say success true in json"}]
@@ -25,13 +25,6 @@ class TestProviderIntegration(unittest.TestCase):
25
25
self.assertIsInstance(response, ChatCompletion)
26
26
self.assertIn("success", json.loads(response.choices[0].message.content))
27
27
28
def test_duckduckgo(self):
29
self.skipTest("Not working")
30
client = Client(provider=DuckDuckGo)
31
response = client.chat.completions.create(DEFAULT_MESSAGES, "", response_format={"type": "json_object"})
32
self.assertIsInstance(response, ChatCompletion)
33
self.assertIn("success", json.loads(response.choices[0].message.content))
34
35
28
def test_openai(self):
36
29
self.skipTest("not working in this network")
37
30
client = Client(provider=OpenaiChat)