@@ -29,7 +29,7 @@ async def test_chat(self) -> None:
29
29
UserMessage (
30
30
message = "Who discovered gravity?" ),
31
31
ChatbotMessage (message = "The man who is widely credited with discovering "
32
- "gravity is Sir Isaac Newton" )
32
+ "gravity is Sir Isaac Newton" )
33
33
],
34
34
message = "What year was he born?" ,
35
35
connectors = [ChatConnector (id = "web-search" )]
@@ -43,7 +43,7 @@ async def test_chat_stream(self) -> None:
43
43
UserMessage (
44
44
message = "Who discovered gravity?" ),
45
45
ChatbotMessage (message = "The man who is widely credited with discovering "
46
- "gravity is Sir Isaac Newton" )
46
+ "gravity is Sir Isaac Newton" )
47
47
],
48
48
message = "What year was he born?" ,
49
49
connectors = [ChatConnector (id = "web-search" )]
@@ -73,7 +73,8 @@ async def test_deprecated_fn(self) -> None:
73
73
74
74
async def test_moved_fn (self ) -> None :
75
75
with self .assertRaises (ValueError ):
76
- await self .co .list_connectors ("dummy" , dummy = "dummy" ) # type: ignore
76
+ # type: ignore
77
+ await self .co .list_connectors ("dummy" , dummy = "dummy" )
77
78
78
79
@unittest .skipIf (os .getenv ("CO_API_URL" ) is not None , "Doesn't work in staging." )
79
80
async def test_generate (self ) -> None :
@@ -176,35 +177,6 @@ async def test_rerank(self) -> None:
176
177
177
178
print (response )
178
179
179
- @unittest .skipIf (os .getenv ("CO_API_URL" ) is not None , "Doesn't work in staging." )
180
- async def test_classify (self ) -> None :
181
- examples = [
182
- ClassifyExample (
183
- text = "Dermatologists don't like her!" , label = "Spam" ),
184
- ClassifyExample (text = "'Hello, open to this?'" , label = "Spam" ),
185
- ClassifyExample (
186
- text = "I need help please wire me $1000 right now" , label = "Spam" ),
187
- ClassifyExample (text = "Nice to know you ;)" , label = "Spam" ),
188
- ClassifyExample (text = "Please help me?" , label = "Spam" ),
189
- ClassifyExample (
190
- text = "Your parcel will be delivered today" , label = "Not spam" ),
191
- ClassifyExample (
192
- text = "Review changes to our Terms and Conditions" , label = "Not spam" ),
193
- ClassifyExample (text = "Weekly sync notes" , label = "Not spam" ),
194
- ClassifyExample (
195
- text = "'Re: Follow up from today's meeting'" , label = "Not spam" ),
196
- ClassifyExample (text = "Pre-read for tomorrow" , label = "Not spam" ),
197
- ]
198
- inputs = [
199
- "Confirm your email address" ,
200
- "hey i need u to send some $" ,
201
- ]
202
- response = await self .co .classify (
203
- inputs = inputs ,
204
- examples = examples ,
205
- )
206
- print (response )
207
-
208
180
@unittest .skipIf (os .getenv ("CO_API_URL" ) is not None , "Doesn't work in staging." )
209
181
async def test_datasets_crud (self ) -> None :
210
182
my_dataset = await self .co .datasets .create (
0 commit comments