22
33from __future__ import annotations
44
5- from typing import Dict , List , Union , Optional , overload
5+ from typing import Dict , List , Union , Iterable , Optional , overload
66from typing_extensions import Literal
77
88import httpx
@@ -42,7 +42,7 @@ def with_streaming_response(self) -> CompletionsWithStreamingResponse:
4242 def create (
4343 self ,
4444 * ,
45- messages : List [ChatCompletionMessageParam ],
45+ messages : Iterable [ChatCompletionMessageParam ],
4646 model : Union [
4747 str ,
4848 Literal [
@@ -67,7 +67,7 @@ def create(
6767 ],
6868 frequency_penalty : Optional [float ] | NotGiven = NOT_GIVEN ,
6969 function_call : completion_create_params .FunctionCall | NotGiven = NOT_GIVEN ,
70- functions : List [completion_create_params .Function ] | NotGiven = NOT_GIVEN ,
70+ functions : Iterable [completion_create_params .Function ] | NotGiven = NOT_GIVEN ,
7171 logit_bias : Optional [Dict [str , int ]] | NotGiven = NOT_GIVEN ,
7272 logprobs : Optional [bool ] | NotGiven = NOT_GIVEN ,
7373 max_tokens : Optional [int ] | NotGiven = NOT_GIVEN ,
@@ -79,7 +79,7 @@ def create(
7979 stream : Optional [Literal [False ]] | NotGiven = NOT_GIVEN ,
8080 temperature : Optional [float ] | NotGiven = NOT_GIVEN ,
8181 tool_choice : ChatCompletionToolChoiceOptionParam | NotGiven = NOT_GIVEN ,
82- tools : List [ChatCompletionToolParam ] | NotGiven = NOT_GIVEN ,
82+ tools : Iterable [ChatCompletionToolParam ] | NotGiven = NOT_GIVEN ,
8383 top_logprobs : Optional [int ] | NotGiven = NOT_GIVEN ,
8484 top_p : Optional [float ] | NotGiven = NOT_GIVEN ,
8585 user : str | NotGiven = NOT_GIVEN ,
@@ -232,7 +232,7 @@ def create(
232232 def create (
233233 self ,
234234 * ,
235- messages : List [ChatCompletionMessageParam ],
235+ messages : Iterable [ChatCompletionMessageParam ],
236236 model : Union [
237237 str ,
238238 Literal [
@@ -258,7 +258,7 @@ def create(
258258 stream : Literal [True ],
259259 frequency_penalty : Optional [float ] | NotGiven = NOT_GIVEN ,
260260 function_call : completion_create_params .FunctionCall | NotGiven = NOT_GIVEN ,
261- functions : List [completion_create_params .Function ] | NotGiven = NOT_GIVEN ,
261+ functions : Iterable [completion_create_params .Function ] | NotGiven = NOT_GIVEN ,
262262 logit_bias : Optional [Dict [str , int ]] | NotGiven = NOT_GIVEN ,
263263 logprobs : Optional [bool ] | NotGiven = NOT_GIVEN ,
264264 max_tokens : Optional [int ] | NotGiven = NOT_GIVEN ,
@@ -269,7 +269,7 @@ def create(
269269 stop : Union [Optional [str ], List [str ]] | NotGiven = NOT_GIVEN ,
270270 temperature : Optional [float ] | NotGiven = NOT_GIVEN ,
271271 tool_choice : ChatCompletionToolChoiceOptionParam | NotGiven = NOT_GIVEN ,
272- tools : List [ChatCompletionToolParam ] | NotGiven = NOT_GIVEN ,
272+ tools : Iterable [ChatCompletionToolParam ] | NotGiven = NOT_GIVEN ,
273273 top_logprobs : Optional [int ] | NotGiven = NOT_GIVEN ,
274274 top_p : Optional [float ] | NotGiven = NOT_GIVEN ,
275275 user : str | NotGiven = NOT_GIVEN ,
@@ -422,7 +422,7 @@ def create(
422422 def create (
423423 self ,
424424 * ,
425- messages : List [ChatCompletionMessageParam ],
425+ messages : Iterable [ChatCompletionMessageParam ],
426426 model : Union [
427427 str ,
428428 Literal [
@@ -448,7 +448,7 @@ def create(
448448 stream : bool ,
449449 frequency_penalty : Optional [float ] | NotGiven = NOT_GIVEN ,
450450 function_call : completion_create_params .FunctionCall | NotGiven = NOT_GIVEN ,
451- functions : List [completion_create_params .Function ] | NotGiven = NOT_GIVEN ,
451+ functions : Iterable [completion_create_params .Function ] | NotGiven = NOT_GIVEN ,
452452 logit_bias : Optional [Dict [str , int ]] | NotGiven = NOT_GIVEN ,
453453 logprobs : Optional [bool ] | NotGiven = NOT_GIVEN ,
454454 max_tokens : Optional [int ] | NotGiven = NOT_GIVEN ,
@@ -459,7 +459,7 @@ def create(
459459 stop : Union [Optional [str ], List [str ]] | NotGiven = NOT_GIVEN ,
460460 temperature : Optional [float ] | NotGiven = NOT_GIVEN ,
461461 tool_choice : ChatCompletionToolChoiceOptionParam | NotGiven = NOT_GIVEN ,
462- tools : List [ChatCompletionToolParam ] | NotGiven = NOT_GIVEN ,
462+ tools : Iterable [ChatCompletionToolParam ] | NotGiven = NOT_GIVEN ,
463463 top_logprobs : Optional [int ] | NotGiven = NOT_GIVEN ,
464464 top_p : Optional [float ] | NotGiven = NOT_GIVEN ,
465465 user : str | NotGiven = NOT_GIVEN ,
@@ -612,7 +612,7 @@ def create(
612612 def create (
613613 self ,
614614 * ,
615- messages : List [ChatCompletionMessageParam ],
615+ messages : Iterable [ChatCompletionMessageParam ],
616616 model : Union [
617617 str ,
618618 Literal [
@@ -637,7 +637,7 @@ def create(
637637 ],
638638 frequency_penalty : Optional [float ] | NotGiven = NOT_GIVEN ,
639639 function_call : completion_create_params .FunctionCall | NotGiven = NOT_GIVEN ,
640- functions : List [completion_create_params .Function ] | NotGiven = NOT_GIVEN ,
640+ functions : Iterable [completion_create_params .Function ] | NotGiven = NOT_GIVEN ,
641641 logit_bias : Optional [Dict [str , int ]] | NotGiven = NOT_GIVEN ,
642642 logprobs : Optional [bool ] | NotGiven = NOT_GIVEN ,
643643 max_tokens : Optional [int ] | NotGiven = NOT_GIVEN ,
@@ -649,7 +649,7 @@ def create(
649649 stream : Optional [Literal [False ]] | Literal [True ] | NotGiven = NOT_GIVEN ,
650650 temperature : Optional [float ] | NotGiven = NOT_GIVEN ,
651651 tool_choice : ChatCompletionToolChoiceOptionParam | NotGiven = NOT_GIVEN ,
652- tools : List [ChatCompletionToolParam ] | NotGiven = NOT_GIVEN ,
652+ tools : Iterable [ChatCompletionToolParam ] | NotGiven = NOT_GIVEN ,
653653 top_logprobs : Optional [int ] | NotGiven = NOT_GIVEN ,
654654 top_p : Optional [float ] | NotGiven = NOT_GIVEN ,
655655 user : str | NotGiven = NOT_GIVEN ,
@@ -709,7 +709,7 @@ def with_streaming_response(self) -> AsyncCompletionsWithStreamingResponse:
709709 async def create (
710710 self ,
711711 * ,
712- messages : List [ChatCompletionMessageParam ],
712+ messages : Iterable [ChatCompletionMessageParam ],
713713 model : Union [
714714 str ,
715715 Literal [
@@ -734,7 +734,7 @@ async def create(
734734 ],
735735 frequency_penalty : Optional [float ] | NotGiven = NOT_GIVEN ,
736736 function_call : completion_create_params .FunctionCall | NotGiven = NOT_GIVEN ,
737- functions : List [completion_create_params .Function ] | NotGiven = NOT_GIVEN ,
737+ functions : Iterable [completion_create_params .Function ] | NotGiven = NOT_GIVEN ,
738738 logit_bias : Optional [Dict [str , int ]] | NotGiven = NOT_GIVEN ,
739739 logprobs : Optional [bool ] | NotGiven = NOT_GIVEN ,
740740 max_tokens : Optional [int ] | NotGiven = NOT_GIVEN ,
@@ -746,7 +746,7 @@ async def create(
746746 stream : Optional [Literal [False ]] | NotGiven = NOT_GIVEN ,
747747 temperature : Optional [float ] | NotGiven = NOT_GIVEN ,
748748 tool_choice : ChatCompletionToolChoiceOptionParam | NotGiven = NOT_GIVEN ,
749- tools : List [ChatCompletionToolParam ] | NotGiven = NOT_GIVEN ,
749+ tools : Iterable [ChatCompletionToolParam ] | NotGiven = NOT_GIVEN ,
750750 top_logprobs : Optional [int ] | NotGiven = NOT_GIVEN ,
751751 top_p : Optional [float ] | NotGiven = NOT_GIVEN ,
752752 user : str | NotGiven = NOT_GIVEN ,
@@ -899,7 +899,7 @@ async def create(
899899 async def create (
900900 self ,
901901 * ,
902- messages : List [ChatCompletionMessageParam ],
902+ messages : Iterable [ChatCompletionMessageParam ],
903903 model : Union [
904904 str ,
905905 Literal [
@@ -925,7 +925,7 @@ async def create(
925925 stream : Literal [True ],
926926 frequency_penalty : Optional [float ] | NotGiven = NOT_GIVEN ,
927927 function_call : completion_create_params .FunctionCall | NotGiven = NOT_GIVEN ,
928- functions : List [completion_create_params .Function ] | NotGiven = NOT_GIVEN ,
928+ functions : Iterable [completion_create_params .Function ] | NotGiven = NOT_GIVEN ,
929929 logit_bias : Optional [Dict [str , int ]] | NotGiven = NOT_GIVEN ,
930930 logprobs : Optional [bool ] | NotGiven = NOT_GIVEN ,
931931 max_tokens : Optional [int ] | NotGiven = NOT_GIVEN ,
@@ -936,7 +936,7 @@ async def create(
936936 stop : Union [Optional [str ], List [str ]] | NotGiven = NOT_GIVEN ,
937937 temperature : Optional [float ] | NotGiven = NOT_GIVEN ,
938938 tool_choice : ChatCompletionToolChoiceOptionParam | NotGiven = NOT_GIVEN ,
939- tools : List [ChatCompletionToolParam ] | NotGiven = NOT_GIVEN ,
939+ tools : Iterable [ChatCompletionToolParam ] | NotGiven = NOT_GIVEN ,
940940 top_logprobs : Optional [int ] | NotGiven = NOT_GIVEN ,
941941 top_p : Optional [float ] | NotGiven = NOT_GIVEN ,
942942 user : str | NotGiven = NOT_GIVEN ,
@@ -1089,7 +1089,7 @@ async def create(
10891089 async def create (
10901090 self ,
10911091 * ,
1092- messages : List [ChatCompletionMessageParam ],
1092+ messages : Iterable [ChatCompletionMessageParam ],
10931093 model : Union [
10941094 str ,
10951095 Literal [
@@ -1115,7 +1115,7 @@ async def create(
11151115 stream : bool ,
11161116 frequency_penalty : Optional [float ] | NotGiven = NOT_GIVEN ,
11171117 function_call : completion_create_params .FunctionCall | NotGiven = NOT_GIVEN ,
1118- functions : List [completion_create_params .Function ] | NotGiven = NOT_GIVEN ,
1118+ functions : Iterable [completion_create_params .Function ] | NotGiven = NOT_GIVEN ,
11191119 logit_bias : Optional [Dict [str , int ]] | NotGiven = NOT_GIVEN ,
11201120 logprobs : Optional [bool ] | NotGiven = NOT_GIVEN ,
11211121 max_tokens : Optional [int ] | NotGiven = NOT_GIVEN ,
@@ -1126,7 +1126,7 @@ async def create(
11261126 stop : Union [Optional [str ], List [str ]] | NotGiven = NOT_GIVEN ,
11271127 temperature : Optional [float ] | NotGiven = NOT_GIVEN ,
11281128 tool_choice : ChatCompletionToolChoiceOptionParam | NotGiven = NOT_GIVEN ,
1129- tools : List [ChatCompletionToolParam ] | NotGiven = NOT_GIVEN ,
1129+ tools : Iterable [ChatCompletionToolParam ] | NotGiven = NOT_GIVEN ,
11301130 top_logprobs : Optional [int ] | NotGiven = NOT_GIVEN ,
11311131 top_p : Optional [float ] | NotGiven = NOT_GIVEN ,
11321132 user : str | NotGiven = NOT_GIVEN ,
@@ -1279,7 +1279,7 @@ async def create(
12791279 async def create (
12801280 self ,
12811281 * ,
1282- messages : List [ChatCompletionMessageParam ],
1282+ messages : Iterable [ChatCompletionMessageParam ],
12831283 model : Union [
12841284 str ,
12851285 Literal [
@@ -1304,7 +1304,7 @@ async def create(
13041304 ],
13051305 frequency_penalty : Optional [float ] | NotGiven = NOT_GIVEN ,
13061306 function_call : completion_create_params .FunctionCall | NotGiven = NOT_GIVEN ,
1307- functions : List [completion_create_params .Function ] | NotGiven = NOT_GIVEN ,
1307+ functions : Iterable [completion_create_params .Function ] | NotGiven = NOT_GIVEN ,
13081308 logit_bias : Optional [Dict [str , int ]] | NotGiven = NOT_GIVEN ,
13091309 logprobs : Optional [bool ] | NotGiven = NOT_GIVEN ,
13101310 max_tokens : Optional [int ] | NotGiven = NOT_GIVEN ,
@@ -1316,7 +1316,7 @@ async def create(
13161316 stream : Optional [Literal [False ]] | Literal [True ] | NotGiven = NOT_GIVEN ,
13171317 temperature : Optional [float ] | NotGiven = NOT_GIVEN ,
13181318 tool_choice : ChatCompletionToolChoiceOptionParam | NotGiven = NOT_GIVEN ,
1319- tools : List [ChatCompletionToolParam ] | NotGiven = NOT_GIVEN ,
1319+ tools : Iterable [ChatCompletionToolParam ] | NotGiven = NOT_GIVEN ,
13201320 top_logprobs : Optional [int ] | NotGiven = NOT_GIVEN ,
13211321 top_p : Optional [float ] | NotGiven = NOT_GIVEN ,
13221322 user : str | NotGiven = NOT_GIVEN ,
0 commit comments