2727 completion_create_params ,
2828 ChatCompletionStreamOptionsParam ,
2929 ChatCompletionToolParam ,
30+ ChatCompletionToolChoiceOptionParam ,
3031)
3132
3233__all__ = ["Completions" , "AsyncCompletions" ]
@@ -49,7 +50,6 @@ def create(
4950 model : str ,
5051 frequency_penalty : Optional [float ] | None = None ,
5152 function_call : completion_create_params .FunctionCall | None = None ,
52- functions : Iterable [completion_create_params .Function ] | None = None ,
5353 logit_bias : Optional [Dict [str , int ]] | None = None ,
5454 logprobs : Optional [bool ] | None = None ,
5555 max_tokens : Optional [int ] | None = None ,
@@ -61,6 +61,10 @@ def create(
6161 tools : Iterable [ChatCompletionToolParam ] | None = None ,
6262 top_logprobs : Optional [int ] | None = None ,
6363 top_p : Optional [float ] | None = None ,
64+ repetition_penalty : Optional [float ] | None = None ,
65+ n : Optional [int ] | None = None ,
66+ tool_choice : ChatCompletionToolChoiceOptionParam | None = None ,
67+ response_format : completion_create_params .ResponseFormat | None = None ,
6468 user : str | None = None ,
6569 metadata : Dict [str , object ] | None = None ,
6670 extra_headers : Headers | None = None ,
@@ -75,7 +79,6 @@ def create(
7579 "model" : model ,
7680 "frequency_penalty" : frequency_penalty ,
7781 "function_call" : function_call ,
78- "functions" : functions ,
7982 "logit_bias" : logit_bias ,
8083 "logprobs" : logprobs ,
8184 "max_tokens" : max_tokens ,
@@ -88,6 +91,10 @@ def create(
8891 "top_logprobs" : top_logprobs ,
8992 "top_p" : top_p ,
9093 "user" : user ,
94+ "repetition_penalty" : repetition_penalty ,
95+ "n" : n ,
96+ "tool_choice" : tool_choice ,
97+ "response_format" : response_format ,
9198 "metadata" : metadata
9299 },
93100 options = make_request_options (
@@ -119,7 +126,6 @@ async def create(
119126 model : str ,
120127 frequency_penalty : Optional [float ] | None = None ,
121128 function_call : completion_create_params .FunctionCall | None = None ,
122- functions : Iterable [completion_create_params .Function ] | None = None ,
123129 logit_bias : Optional [Dict [str , int ]] | None = None ,
124130 logprobs : Optional [bool ] | None = None ,
125131 max_tokens : Optional [int ] | None = None ,
@@ -131,6 +137,10 @@ async def create(
131137 tools : Iterable [ChatCompletionToolParam ] | None = None ,
132138 top_logprobs : Optional [int ] | None = None ,
133139 top_p : Optional [float ] | None = None ,
140+ repetition_penalty : Optional [float ] | None = None ,
141+ n : Optional [int ] | None = None ,
142+ tool_choice : ChatCompletionToolChoiceOptionParam | None = None ,
143+ response_format : completion_create_params .ResponseFormat | None = None ,
134144 user : str | None = None ,
135145 metadata : Dict [str , object ] | None = None ,
136146 extra_headers : Headers | None = None ,
@@ -145,7 +155,6 @@ async def create(
145155 "model" : model ,
146156 "frequency_penalty" : frequency_penalty ,
147157 "function_call" : function_call ,
148- "functions" : functions ,
149158 "logit_bias" : logit_bias ,
150159 "logprobs" : logprobs ,
151160 "max_tokens" : max_tokens ,
@@ -158,6 +167,10 @@ async def create(
158167 "top_logprobs" : top_logprobs ,
159168 "top_p" : top_p ,
160169 "user" : user ,
170+ "repetition_penalty" : repetition_penalty ,
171+ "n" : n ,
172+ "tool_choice" : tool_choice ,
173+ "response_format" : response_format ,
161174 "metadata" : metadata
162175 },
163176 options = make_request_options (
0 commit comments