From 6f00aae381e4ae8cf980837583760c542906748c Mon Sep 17 00:00:00 2001 From: Magdy Saleh Date: Wed, 21 Feb 2024 15:04:28 -0500 Subject: [PATCH] change name to match REST --- clients/python/lorax/client.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/clients/python/lorax/client.py b/clients/python/lorax/client.py index d34f7f9c1..a52e74bab 100644 --- a/clients/python/lorax/client.py +++ b/clients/python/lorax/client.py @@ -81,7 +81,7 @@ def generate( watermark: bool = False, response_format: Optional[Union[Dict[str, Any], ResponseFormat]] = None, decoder_input_details: bool = False, - generated_token_details: bool = True, + details: bool = True, ) -> Response: """ Given a prompt, generate the following text @@ -139,7 +139,7 @@ def generate( ``` decoder_input_details (`bool`): Return the decoder input token logprobs and ids - generated_token_details (`bool`): + details (`bool`): Return the token logprobs and ids for generated tokens Returns: @@ -152,7 +152,7 @@ def generate( merged_adapters=merged_adapters, api_token=api_token, best_of=best_of, - details=generated_token_details, + details=details, do_sample=do_sample, max_new_tokens=max_new_tokens, repetition_penalty=repetition_penalty, @@ -205,7 +205,7 @@ def generate_stream( typical_p: Optional[float] = None, watermark: bool = False, response_format: Optional[Union[Dict[str, Any], ResponseFormat]] = None, - generated_token_details: bool = True, + details: bool = True, ) -> Iterator[StreamResponse]: """ Given a prompt, generate the following stream of tokens @@ -259,7 +259,7 @@ def generate_stream( } } ``` - generated_token_details (`bool`): + details (`bool`): Return the token logprobs and ids for generated tokens Returns: @@ -272,7 +272,7 @@ def generate_stream( merged_adapters=merged_adapters, api_token=api_token, best_of=None, - details=generated_token_details, + details=details, decoder_input_details=False, do_sample=do_sample, max_new_tokens=max_new_tokens, @@ -390,7 +390,7 @@ async def generate( watermark: bool = False, response_format: Optional[Union[Dict[str, Any], ResponseFormat]] = None, decoder_input_details: bool = False, - generated_token_details: bool = True, + details: bool = True, ) -> Response: """ Given a prompt, generate the following text asynchronously @@ -448,7 +448,7 @@ async def generate( ``` decoder_input_details (`bool`): Return the decoder input token logprobs and ids - generated_token_details (`bool`): + details (`bool`): Return the token logprobs and ids for generated tokens Returns: @@ -461,7 +461,7 @@ async def generate( merged_adapters=merged_adapters, api_token=api_token, best_of=best_of, - details=generated_token_details, + details=details, decoder_input_details=decoder_input_details, do_sample=do_sample, max_new_tokens=max_new_tokens, @@ -509,7 +509,7 @@ async def generate_stream( typical_p: Optional[float] = None, watermark: bool = False, response_format: Optional[Union[Dict[str, Any], ResponseFormat]] = None, - generated_token_details: bool = True, + details: bool = True, ) -> AsyncIterator[StreamResponse]: """ Given a prompt, generate the following stream of tokens asynchronously @@ -563,7 +563,7 @@ async def generate_stream( } } ``` - generated_token_details (`bool`): + details (`bool`): Return the token logprobs and ids for generated tokens Returns: @@ -576,7 +576,7 @@ async def generate_stream( merged_adapters=merged_adapters, api_token=api_token, best_of=None, - details=generated_token_details, + details=details, decoder_input_details=False, do_sample=do_sample, max_new_tokens=max_new_tokens,