From 81b5fceb52ad264777dadc477c51f42604b5f4dd Mon Sep 17 00:00:00 2001 From: Devin Conathan Date: Thu, 23 Mar 2023 09:04:31 -0400 Subject: [PATCH] fix inference_api headers for new signature --- clients/python/text_generation/inference_api.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/clients/python/text_generation/inference_api.py b/clients/python/text_generation/inference_api.py index bc6022b3..eb70b3d1 100644 --- a/clients/python/text_generation/inference_api.py +++ b/clients/python/text_generation/inference_api.py @@ -92,7 +92,9 @@ class InferenceAPIClient(Client): ) base_url = f"{INFERENCE_ENDPOINT}/models/{repo_id}" - super(InferenceAPIClient, self).__init__(base_url, headers, timeout) + super(InferenceAPIClient, self).__init__( + base_url, headers=headers, timeout=timeout + ) class InferenceAPIAsyncClient(AsyncClient): @@ -147,4 +149,6 @@ class InferenceAPIAsyncClient(AsyncClient): ) base_url = f"{INFERENCE_ENDPOINT}/models/{repo_id}" - super(InferenceAPIAsyncClient, self).__init__(base_url, headers, timeout) + super(InferenceAPIAsyncClient, self).__init__( + base_url, headers=headers, timeout=timeout + )