Skip to content

Commit d731bf5

Browse files
committed
udpate
1 parent c55844d commit d731bf5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

clueai/client.py

+2
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,8 @@ def classify(
384384
'labels': labels
385385
}, ensure_ascii=False)
386386
response = self.__request(json_body, clueai.CLASSIFY_URL, model_name)
387+
if "result" not in response:
388+
raise ClueaiError(f'No result in response, please check or try. error{response}')
387389
classifications = []
388390
for res in response['result']:
389391
confidenceObj = []

0 commit comments

Comments
 (0)