@@ -1526,8 +1526,6 @@ def cancel(
15261526 def compact (
15271527 self ,
15281528 * ,
1529- input : Union [str , Iterable [ResponseInputItemParam ], None ] | Omit = omit ,
1530- instructions : Optional [str ] | Omit = omit ,
15311529 model : Union [
15321530 Literal [
15331531 "gpt-5.1" ,
@@ -1614,8 +1612,9 @@ def compact(
16141612 ],
16151613 str ,
16161614 None ,
1617- ]
1618- | Omit = omit ,
1615+ ],
1616+ input : Union [str , Iterable [ResponseInputItemParam ], None ] | Omit = omit ,
1617+ instructions : Optional [str ] | Omit = omit ,
16191618 previous_response_id : Optional [str ] | Omit = omit ,
16201619 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
16211620 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -1628,19 +1627,19 @@ def compact(
16281627 Compact conversation
16291628
16301629 Args:
1630+ model: Model ID used to generate the response, like `gpt-5` or `o3`. OpenAI offers a
1631+ wide range of models with different capabilities, performance characteristics,
1632+ and price points. Refer to the
1633+ [model guide](https://platform.openai.com/docs/models) to browse and compare
1634+ available models.
1635+
16311636 input: Text, image, or file inputs to the model, used to generate a response
16321637
16331638 instructions: A system (or developer) message inserted into the model's context. When used
16341639 along with `previous_response_id`, the instructions from a previous response
16351640 will not be carried over to the next response. This makes it simple to swap out
16361641 system (or developer) messages in new responses.
16371642
1638- model: Model ID used to generate the response, like `gpt-5` or `o3`. OpenAI offers a
1639- wide range of models with different capabilities, performance characteristics,
1640- and price points. Refer to the
1641- [model guide](https://platform.openai.com/docs/models) to browse and compare
1642- available models.
1643-
16441643 previous_response_id: The unique ID of the previous response to the model. Use this to create
16451644 multi-turn conversations. Learn more about
16461645 [conversation state](https://platform.openai.com/docs/guides/conversation-state).
@@ -1658,9 +1657,9 @@ def compact(
16581657 "/responses/compact" ,
16591658 body = maybe_transform (
16601659 {
1660+ "model" : model ,
16611661 "input" : input ,
16621662 "instructions" : instructions ,
1663- "model" : model ,
16641663 "previous_response_id" : previous_response_id ,
16651664 },
16661665 response_compact_params .ResponseCompactParams ,
@@ -3140,8 +3139,6 @@ async def cancel(
31403139 async def compact (
31413140 self ,
31423141 * ,
3143- input : Union [str , Iterable [ResponseInputItemParam ], None ] | Omit = omit ,
3144- instructions : Optional [str ] | Omit = omit ,
31453142 model : Union [
31463143 Literal [
31473144 "gpt-5.1" ,
@@ -3228,8 +3225,9 @@ async def compact(
32283225 ],
32293226 str ,
32303227 None ,
3231- ]
3232- | Omit = omit ,
3228+ ],
3229+ input : Union [str , Iterable [ResponseInputItemParam ], None ] | Omit = omit ,
3230+ instructions : Optional [str ] | Omit = omit ,
32333231 previous_response_id : Optional [str ] | Omit = omit ,
32343232 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
32353233 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -3242,19 +3240,19 @@ async def compact(
32423240 Compact conversation
32433241
32443242 Args:
3243+ model: Model ID used to generate the response, like `gpt-5` or `o3`. OpenAI offers a
3244+ wide range of models with different capabilities, performance characteristics,
3245+ and price points. Refer to the
3246+ [model guide](https://platform.openai.com/docs/models) to browse and compare
3247+ available models.
3248+
32453249 input: Text, image, or file inputs to the model, used to generate a response
32463250
32473251 instructions: A system (or developer) message inserted into the model's context. When used
32483252 along with `previous_response_id`, the instructions from a previous response
32493253 will not be carried over to the next response. This makes it simple to swap out
32503254 system (or developer) messages in new responses.
32513255
3252- model: Model ID used to generate the response, like `gpt-5` or `o3`. OpenAI offers a
3253- wide range of models with different capabilities, performance characteristics,
3254- and price points. Refer to the
3255- [model guide](https://platform.openai.com/docs/models) to browse and compare
3256- available models.
3257-
32583256 previous_response_id: The unique ID of the previous response to the model. Use this to create
32593257 multi-turn conversations. Learn more about
32603258 [conversation state](https://platform.openai.com/docs/guides/conversation-state).
@@ -3272,9 +3270,9 @@ async def compact(
32723270 "/responses/compact" ,
32733271 body = await async_maybe_transform (
32743272 {
3273+ "model" : model ,
32753274 "input" : input ,
32763275 "instructions" : instructions ,
3277- "model" : model ,
32783276 "previous_response_id" : previous_response_id ,
32793277 },
32803278 response_compact_params .ResponseCompactParams ,
0 commit comments