diff --git a/clients/python/text_generation/client.py b/clients/python/text_generation/client.py index 8acedfb9..2db46fbe 100644 --- a/clients/python/text_generation/client.py +++ b/clients/python/text_generation/client.py @@ -171,6 +171,7 @@ class Client: temperature: Optional[float] = None, top_p: Optional[float] = None, tools: Optional[List[Tool]] = None, + tool_prompt: Optional[str] = None, tool_choice: Optional[str] = None, stop: Optional[List[str]] = None, ): @@ -211,6 +212,8 @@ class Client: higher are kept for generation tools (`List[Tool]`): List of tools to use + tool_prompt (`str`): + A prompt to be appended before the tools tool_choice (`str`): The tool to use stop (`List[str]`): @@ -233,6 +236,7 @@ class Client: temperature=temperature, top_p=top_p, tools=tools, + tool_prompt=tool_prompt, tool_choice=tool_choice, stop=stop, ) @@ -648,6 +652,7 @@ class AsyncClient: temperature: Optional[float] = None, top_p: Optional[float] = None, tools: Optional[List[Tool]] = None, + tool_prompt: Optional[str] = None, tool_choice: Optional[str] = None, stop: Optional[List[str]] = None, ) -> Union[ChatComplete, AsyncIterator[ChatCompletionChunk]]: @@ -688,6 +693,8 @@ class AsyncClient: higher are kept for generation tools (`List[Tool]`): List of tools to use + tool_prompt (`str`): + A prompt to be appended before the tools tool_choice (`str`): The tool to use stop (`List[str]`): @@ -710,6 +717,7 @@ class AsyncClient: temperature=temperature, top_p=top_p, tools=tools, + tool_prompt=tool_prompt, tool_choice=tool_choice, stop=stop, ) @@ -967,4 +975,4 @@ class AsyncClient: except ValidationError: # If we failed to parse the payload, then it is an error payload raise parse_error(resp.status, json_payload) - yield response + yield response \ No newline at end of file diff --git a/clients/python/text_generation/types.py b/clients/python/text_generation/types.py index eb872ee6..3436d94e 100644 --- a/clients/python/text_generation/types.py +++ b/clients/python/text_generation/types.py @@ -453,4 +453,4 @@ class StreamResponse(BaseModel): # Inference API currently deployed model class DeployedModel(BaseModel): model_id: str - sha: str + sha: str \ No newline at end of file