diff --git a/example/test_apis.py b/example/test_apis.py index 45cd092..4eceb1a 100644 --- a/example/test_apis.py +++ b/example/test_apis.py @@ -83,6 +83,13 @@ def test_inference_by_request_stream(self): res=requests.post(url=self.base_url+"/v1/chat/completions", json=data,headers={"Content-Type": "application/json", "Authorization":"Bearer no-key"},) self.assertEqual(res.status_code, 200) + def test_embedding_api(self): + data = { + "input": "Hello, world!", + "model": "all-MiniLM-L6-v2" + } + res = requests.post(url=self.base_url+"/v1/embeddings", json=data, headers={"Content-Type": "application/json", "Authorization":"Bearer no-key"}) + self.assertEqual(res.status_code, 200) def test_api_key(self): res=requests.get(url=self.base_url+"/v1/token/api-key")