2
2
3
3
from __future__ import annotations
4
4
5
- from typing import Dict , List , Union , Optional , overload
5
+ from typing import Dict , List , Union , Iterable , Optional , overload
6
6
from typing_extensions import Literal
7
7
8
8
import httpx
@@ -42,7 +42,7 @@ def with_streaming_response(self) -> CompletionsWithStreamingResponse:
42
42
def create (
43
43
self ,
44
44
* ,
45
- messages : List [ChatCompletionMessageParam ],
45
+ messages : Iterable [ChatCompletionMessageParam ],
46
46
model : Union [
47
47
str ,
48
48
Literal [
@@ -67,7 +67,7 @@ def create(
67
67
],
68
68
frequency_penalty : Optional [float ] | NotGiven = NOT_GIVEN ,
69
69
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 ,
71
71
logit_bias : Optional [Dict [str , int ]] | NotGiven = NOT_GIVEN ,
72
72
logprobs : Optional [bool ] | NotGiven = NOT_GIVEN ,
73
73
max_tokens : Optional [int ] | NotGiven = NOT_GIVEN ,
@@ -79,7 +79,7 @@ def create(
79
79
stream : Optional [Literal [False ]] | NotGiven = NOT_GIVEN ,
80
80
temperature : Optional [float ] | NotGiven = NOT_GIVEN ,
81
81
tool_choice : ChatCompletionToolChoiceOptionParam | NotGiven = NOT_GIVEN ,
82
- tools : List [ChatCompletionToolParam ] | NotGiven = NOT_GIVEN ,
82
+ tools : Iterable [ChatCompletionToolParam ] | NotGiven = NOT_GIVEN ,
83
83
top_logprobs : Optional [int ] | NotGiven = NOT_GIVEN ,
84
84
top_p : Optional [float ] | NotGiven = NOT_GIVEN ,
85
85
user : str | NotGiven = NOT_GIVEN ,
@@ -232,7 +232,7 @@ def create(
232
232
def create (
233
233
self ,
234
234
* ,
235
- messages : List [ChatCompletionMessageParam ],
235
+ messages : Iterable [ChatCompletionMessageParam ],
236
236
model : Union [
237
237
str ,
238
238
Literal [
@@ -258,7 +258,7 @@ def create(
258
258
stream : Literal [True ],
259
259
frequency_penalty : Optional [float ] | NotGiven = NOT_GIVEN ,
260
260
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 ,
262
262
logit_bias : Optional [Dict [str , int ]] | NotGiven = NOT_GIVEN ,
263
263
logprobs : Optional [bool ] | NotGiven = NOT_GIVEN ,
264
264
max_tokens : Optional [int ] | NotGiven = NOT_GIVEN ,
@@ -269,7 +269,7 @@ def create(
269
269
stop : Union [Optional [str ], List [str ]] | NotGiven = NOT_GIVEN ,
270
270
temperature : Optional [float ] | NotGiven = NOT_GIVEN ,
271
271
tool_choice : ChatCompletionToolChoiceOptionParam | NotGiven = NOT_GIVEN ,
272
- tools : List [ChatCompletionToolParam ] | NotGiven = NOT_GIVEN ,
272
+ tools : Iterable [ChatCompletionToolParam ] | NotGiven = NOT_GIVEN ,
273
273
top_logprobs : Optional [int ] | NotGiven = NOT_GIVEN ,
274
274
top_p : Optional [float ] | NotGiven = NOT_GIVEN ,
275
275
user : str | NotGiven = NOT_GIVEN ,
@@ -422,7 +422,7 @@ def create(
422
422
def create (
423
423
self ,
424
424
* ,
425
- messages : List [ChatCompletionMessageParam ],
425
+ messages : Iterable [ChatCompletionMessageParam ],
426
426
model : Union [
427
427
str ,
428
428
Literal [
@@ -448,7 +448,7 @@ def create(
448
448
stream : bool ,
449
449
frequency_penalty : Optional [float ] | NotGiven = NOT_GIVEN ,
450
450
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 ,
452
452
logit_bias : Optional [Dict [str , int ]] | NotGiven = NOT_GIVEN ,
453
453
logprobs : Optional [bool ] | NotGiven = NOT_GIVEN ,
454
454
max_tokens : Optional [int ] | NotGiven = NOT_GIVEN ,
@@ -459,7 +459,7 @@ def create(
459
459
stop : Union [Optional [str ], List [str ]] | NotGiven = NOT_GIVEN ,
460
460
temperature : Optional [float ] | NotGiven = NOT_GIVEN ,
461
461
tool_choice : ChatCompletionToolChoiceOptionParam | NotGiven = NOT_GIVEN ,
462
- tools : List [ChatCompletionToolParam ] | NotGiven = NOT_GIVEN ,
462
+ tools : Iterable [ChatCompletionToolParam ] | NotGiven = NOT_GIVEN ,
463
463
top_logprobs : Optional [int ] | NotGiven = NOT_GIVEN ,
464
464
top_p : Optional [float ] | NotGiven = NOT_GIVEN ,
465
465
user : str | NotGiven = NOT_GIVEN ,
@@ -612,7 +612,7 @@ def create(
612
612
def create (
613
613
self ,
614
614
* ,
615
- messages : List [ChatCompletionMessageParam ],
615
+ messages : Iterable [ChatCompletionMessageParam ],
616
616
model : Union [
617
617
str ,
618
618
Literal [
@@ -637,7 +637,7 @@ def create(
637
637
],
638
638
frequency_penalty : Optional [float ] | NotGiven = NOT_GIVEN ,
639
639
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 ,
641
641
logit_bias : Optional [Dict [str , int ]] | NotGiven = NOT_GIVEN ,
642
642
logprobs : Optional [bool ] | NotGiven = NOT_GIVEN ,
643
643
max_tokens : Optional [int ] | NotGiven = NOT_GIVEN ,
@@ -649,7 +649,7 @@ def create(
649
649
stream : Optional [Literal [False ]] | Literal [True ] | NotGiven = NOT_GIVEN ,
650
650
temperature : Optional [float ] | NotGiven = NOT_GIVEN ,
651
651
tool_choice : ChatCompletionToolChoiceOptionParam | NotGiven = NOT_GIVEN ,
652
- tools : List [ChatCompletionToolParam ] | NotGiven = NOT_GIVEN ,
652
+ tools : Iterable [ChatCompletionToolParam ] | NotGiven = NOT_GIVEN ,
653
653
top_logprobs : Optional [int ] | NotGiven = NOT_GIVEN ,
654
654
top_p : Optional [float ] | NotGiven = NOT_GIVEN ,
655
655
user : str | NotGiven = NOT_GIVEN ,
@@ -709,7 +709,7 @@ def with_streaming_response(self) -> AsyncCompletionsWithStreamingResponse:
709
709
async def create (
710
710
self ,
711
711
* ,
712
- messages : List [ChatCompletionMessageParam ],
712
+ messages : Iterable [ChatCompletionMessageParam ],
713
713
model : Union [
714
714
str ,
715
715
Literal [
@@ -734,7 +734,7 @@ async def create(
734
734
],
735
735
frequency_penalty : Optional [float ] | NotGiven = NOT_GIVEN ,
736
736
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 ,
738
738
logit_bias : Optional [Dict [str , int ]] | NotGiven = NOT_GIVEN ,
739
739
logprobs : Optional [bool ] | NotGiven = NOT_GIVEN ,
740
740
max_tokens : Optional [int ] | NotGiven = NOT_GIVEN ,
@@ -746,7 +746,7 @@ async def create(
746
746
stream : Optional [Literal [False ]] | NotGiven = NOT_GIVEN ,
747
747
temperature : Optional [float ] | NotGiven = NOT_GIVEN ,
748
748
tool_choice : ChatCompletionToolChoiceOptionParam | NotGiven = NOT_GIVEN ,
749
- tools : List [ChatCompletionToolParam ] | NotGiven = NOT_GIVEN ,
749
+ tools : Iterable [ChatCompletionToolParam ] | NotGiven = NOT_GIVEN ,
750
750
top_logprobs : Optional [int ] | NotGiven = NOT_GIVEN ,
751
751
top_p : Optional [float ] | NotGiven = NOT_GIVEN ,
752
752
user : str | NotGiven = NOT_GIVEN ,
@@ -899,7 +899,7 @@ async def create(
899
899
async def create (
900
900
self ,
901
901
* ,
902
- messages : List [ChatCompletionMessageParam ],
902
+ messages : Iterable [ChatCompletionMessageParam ],
903
903
model : Union [
904
904
str ,
905
905
Literal [
@@ -925,7 +925,7 @@ async def create(
925
925
stream : Literal [True ],
926
926
frequency_penalty : Optional [float ] | NotGiven = NOT_GIVEN ,
927
927
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 ,
929
929
logit_bias : Optional [Dict [str , int ]] | NotGiven = NOT_GIVEN ,
930
930
logprobs : Optional [bool ] | NotGiven = NOT_GIVEN ,
931
931
max_tokens : Optional [int ] | NotGiven = NOT_GIVEN ,
@@ -936,7 +936,7 @@ async def create(
936
936
stop : Union [Optional [str ], List [str ]] | NotGiven = NOT_GIVEN ,
937
937
temperature : Optional [float ] | NotGiven = NOT_GIVEN ,
938
938
tool_choice : ChatCompletionToolChoiceOptionParam | NotGiven = NOT_GIVEN ,
939
- tools : List [ChatCompletionToolParam ] | NotGiven = NOT_GIVEN ,
939
+ tools : Iterable [ChatCompletionToolParam ] | NotGiven = NOT_GIVEN ,
940
940
top_logprobs : Optional [int ] | NotGiven = NOT_GIVEN ,
941
941
top_p : Optional [float ] | NotGiven = NOT_GIVEN ,
942
942
user : str | NotGiven = NOT_GIVEN ,
@@ -1089,7 +1089,7 @@ async def create(
1089
1089
async def create (
1090
1090
self ,
1091
1091
* ,
1092
- messages : List [ChatCompletionMessageParam ],
1092
+ messages : Iterable [ChatCompletionMessageParam ],
1093
1093
model : Union [
1094
1094
str ,
1095
1095
Literal [
@@ -1115,7 +1115,7 @@ async def create(
1115
1115
stream : bool ,
1116
1116
frequency_penalty : Optional [float ] | NotGiven = NOT_GIVEN ,
1117
1117
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 ,
1119
1119
logit_bias : Optional [Dict [str , int ]] | NotGiven = NOT_GIVEN ,
1120
1120
logprobs : Optional [bool ] | NotGiven = NOT_GIVEN ,
1121
1121
max_tokens : Optional [int ] | NotGiven = NOT_GIVEN ,
@@ -1126,7 +1126,7 @@ async def create(
1126
1126
stop : Union [Optional [str ], List [str ]] | NotGiven = NOT_GIVEN ,
1127
1127
temperature : Optional [float ] | NotGiven = NOT_GIVEN ,
1128
1128
tool_choice : ChatCompletionToolChoiceOptionParam | NotGiven = NOT_GIVEN ,
1129
- tools : List [ChatCompletionToolParam ] | NotGiven = NOT_GIVEN ,
1129
+ tools : Iterable [ChatCompletionToolParam ] | NotGiven = NOT_GIVEN ,
1130
1130
top_logprobs : Optional [int ] | NotGiven = NOT_GIVEN ,
1131
1131
top_p : Optional [float ] | NotGiven = NOT_GIVEN ,
1132
1132
user : str | NotGiven = NOT_GIVEN ,
@@ -1279,7 +1279,7 @@ async def create(
1279
1279
async def create (
1280
1280
self ,
1281
1281
* ,
1282
- messages : List [ChatCompletionMessageParam ],
1282
+ messages : Iterable [ChatCompletionMessageParam ],
1283
1283
model : Union [
1284
1284
str ,
1285
1285
Literal [
@@ -1304,7 +1304,7 @@ async def create(
1304
1304
],
1305
1305
frequency_penalty : Optional [float ] | NotGiven = NOT_GIVEN ,
1306
1306
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 ,
1308
1308
logit_bias : Optional [Dict [str , int ]] | NotGiven = NOT_GIVEN ,
1309
1309
logprobs : Optional [bool ] | NotGiven = NOT_GIVEN ,
1310
1310
max_tokens : Optional [int ] | NotGiven = NOT_GIVEN ,
@@ -1316,7 +1316,7 @@ async def create(
1316
1316
stream : Optional [Literal [False ]] | Literal [True ] | NotGiven = NOT_GIVEN ,
1317
1317
temperature : Optional [float ] | NotGiven = NOT_GIVEN ,
1318
1318
tool_choice : ChatCompletionToolChoiceOptionParam | NotGiven = NOT_GIVEN ,
1319
- tools : List [ChatCompletionToolParam ] | NotGiven = NOT_GIVEN ,
1319
+ tools : Iterable [ChatCompletionToolParam ] | NotGiven = NOT_GIVEN ,
1320
1320
top_logprobs : Optional [int ] | NotGiven = NOT_GIVEN ,
1321
1321
top_p : Optional [float ] | NotGiven = NOT_GIVEN ,
1322
1322
user : str | NotGiven = NOT_GIVEN ,
0 commit comments