5656from ....types .chat .chat_completion_tool_choice_option_param import (
5757 ChatCompletionToolChoiceOptionParam ,
5858)
59+ from ....types .shared .reasoning_effort import ReasoningEffort
60+
5961
6062__all__ = ["Completions" , "AsyncCompletions" ]
6163
@@ -100,6 +102,7 @@ def parse(
100102 top_logprobs : Optional [int ] | NotGiven = NOT_GIVEN ,
101103 top_p : Optional [float ] | NotGiven = NOT_GIVEN ,
102104 user : str | NotGiven = NOT_GIVEN ,
105+ reasoning_effort : Optional [ReasoningEffort ] | NotGiven = NOT_GIVEN ,
103106 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
104107 # The extra values given here take precedence over values defined on the client or passed to this method.
105108 extra_headers : Headers | None = None ,
@@ -147,6 +150,7 @@ def parser(
147150 "top_logprobs" : top_logprobs ,
148151 "top_p" : top_p ,
149152 "user" : user ,
153+ "reasoning_effort" : reasoning_effort ,
150154 },
151155 completion_create_params .CompletionCreateParams ,
152156 ),
@@ -188,6 +192,7 @@ def stream(
188192 top_logprobs : Optional [int ] | NotGiven = NOT_GIVEN ,
189193 top_p : Optional [float ] | NotGiven = NOT_GIVEN ,
190194 user : str | NotGiven = NOT_GIVEN ,
195+ reasoning_effort : Optional [ReasoningEffort ] | NotGiven = NOT_GIVEN ,
191196 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
192197 # The extra values given here take precedence over values defined on the client or passed to this method.
193198 extra_headers : Headers | None = None ,
@@ -202,6 +207,7 @@ def stream(
202207
203208 api_request : partial [Stream [ChatCompletionChunk ]] = partial (
204209 self ._client .chat .completions .create ,
210+ reasoning_effort = reasoning_effort ,
205211 messages = messages ,
206212 model = model ,
207213 stream = True ,
@@ -274,6 +280,7 @@ async def parse(
274280 top_logprobs : Optional [int ] | NotGiven = NOT_GIVEN ,
275281 top_p : Optional [float ] | NotGiven = NOT_GIVEN ,
276282 user : str | NotGiven = NOT_GIVEN ,
283+ reasoning_effort : Optional [ReasoningEffort ] | NotGiven = NOT_GIVEN ,
277284 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
278285 # The extra values given here take precedence over values defined on the client or passed to this method.
279286 extra_headers : Headers | None = None ,
@@ -321,6 +328,7 @@ def parser(
321328 "top_logprobs" : top_logprobs ,
322329 "top_p" : top_p ,
323330 "user" : user ,
331+ "reasoning_effort" : reasoning_effort ,
324332 },
325333 completion_create_params .CompletionCreateParams ,
326334 ),
@@ -362,6 +370,7 @@ def stream(
362370 top_logprobs : Optional [int ] | NotGiven = NOT_GIVEN ,
363371 top_p : Optional [float ] | NotGiven = NOT_GIVEN ,
364372 user : str | NotGiven = NOT_GIVEN ,
373+ reasoning_effort : Optional [ReasoningEffort ] | NotGiven = NOT_GIVEN ,
365374 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
366375 # The extra values given here take precedence over values defined on the client or passed to this method.
367376 extra_headers : Headers | None = None ,
@@ -397,6 +406,7 @@ def stream(
397406 top_logprobs = top_logprobs ,
398407 top_p = top_p ,
399408 user = user ,
409+ reasoning_effort = reasoning_effort ,
400410 extra_headers = extra_headers ,
401411 extra_query = extra_query ,
402412 extra_body = extra_body ,
0 commit comments