27
27
)
28
28
from .._streaming import Stream , AsyncStream
29
29
from .._base_client import make_request_options
30
- from ..types .completion_response import CompletionResponse
31
30
from ..types .embeddings_response import EmbeddingsResponse
32
31
from ..types .shared_params .message import Message
33
32
from ..types .shared .batch_completion import BatchCompletion
33
+ from ..types .inference_completion_params import UnnamedTypeWithNoPropertyInfoOrParent0
34
34
from ..types .shared_params .response_format import ResponseFormat
35
35
from ..types .shared_params .sampling_params import SamplingParams
36
36
from ..types .shared .chat_completion_response import ChatCompletionResponse
@@ -467,7 +467,7 @@ def completion(
467
467
extra_query : Query | None = None ,
468
468
extra_body : Body | None = None ,
469
469
timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
470
- ) -> CompletionResponse :
470
+ ) -> UnnamedTypeWithNoPropertyInfoOrParent0 :
471
471
"""
472
472
Generate a completion for the given content using the specified model.
473
473
@@ -514,7 +514,7 @@ def completion(
514
514
extra_query : Query | None = None ,
515
515
extra_body : Body | None = None ,
516
516
timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
517
- ) -> Stream [CompletionResponse ]:
517
+ ) -> Stream [UnnamedTypeWithNoPropertyInfoOrParent0 ]:
518
518
"""
519
519
Generate a completion for the given content using the specified model.
520
520
@@ -561,7 +561,7 @@ def completion(
561
561
extra_query : Query | None = None ,
562
562
extra_body : Body | None = None ,
563
563
timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
564
- ) -> CompletionResponse | Stream [CompletionResponse ]:
564
+ ) -> UnnamedTypeWithNoPropertyInfoOrParent0 | Stream [UnnamedTypeWithNoPropertyInfoOrParent0 ]:
565
565
"""
566
566
Generate a completion for the given content using the specified model.
567
567
@@ -608,7 +608,7 @@ def completion(
608
608
extra_query : Query | None = None ,
609
609
extra_body : Body | None = None ,
610
610
timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
611
- ) -> CompletionResponse | Stream [CompletionResponse ]:
611
+ ) -> UnnamedTypeWithNoPropertyInfoOrParent0 | Stream [UnnamedTypeWithNoPropertyInfoOrParent0 ]:
612
612
if stream :
613
613
extra_headers = {"Accept" : "text/event-stream" , ** (extra_headers or {})}
614
614
return self ._post (
@@ -629,9 +629,9 @@ def completion(
629
629
options = make_request_options (
630
630
extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
631
631
),
632
- cast_to = CompletionResponse ,
632
+ cast_to = UnnamedTypeWithNoPropertyInfoOrParent0 ,
633
633
stream = stream or False ,
634
- stream_cls = Stream [CompletionResponse ],
634
+ stream_cls = Stream [UnnamedTypeWithNoPropertyInfoOrParent0 ],
635
635
)
636
636
637
637
@typing_extensions .deprecated ("/v1/inference/embeddings is deprecated. Please use /v1/openai/v1/embeddings." )
@@ -1122,7 +1122,7 @@ async def completion(
1122
1122
extra_query : Query | None = None ,
1123
1123
extra_body : Body | None = None ,
1124
1124
timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
1125
- ) -> CompletionResponse :
1125
+ ) -> UnnamedTypeWithNoPropertyInfoOrParent0 :
1126
1126
"""
1127
1127
Generate a completion for the given content using the specified model.
1128
1128
@@ -1169,7 +1169,7 @@ async def completion(
1169
1169
extra_query : Query | None = None ,
1170
1170
extra_body : Body | None = None ,
1171
1171
timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
1172
- ) -> AsyncStream [CompletionResponse ]:
1172
+ ) -> AsyncStream [UnnamedTypeWithNoPropertyInfoOrParent0 ]:
1173
1173
"""
1174
1174
Generate a completion for the given content using the specified model.
1175
1175
@@ -1216,7 +1216,7 @@ async def completion(
1216
1216
extra_query : Query | None = None ,
1217
1217
extra_body : Body | None = None ,
1218
1218
timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
1219
- ) -> CompletionResponse | AsyncStream [CompletionResponse ]:
1219
+ ) -> UnnamedTypeWithNoPropertyInfoOrParent0 | AsyncStream [UnnamedTypeWithNoPropertyInfoOrParent0 ]:
1220
1220
"""
1221
1221
Generate a completion for the given content using the specified model.
1222
1222
@@ -1263,7 +1263,7 @@ async def completion(
1263
1263
extra_query : Query | None = None ,
1264
1264
extra_body : Body | None = None ,
1265
1265
timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
1266
- ) -> CompletionResponse | AsyncStream [CompletionResponse ]:
1266
+ ) -> UnnamedTypeWithNoPropertyInfoOrParent0 | AsyncStream [UnnamedTypeWithNoPropertyInfoOrParent0 ]:
1267
1267
if stream :
1268
1268
extra_headers = {"Accept" : "text/event-stream" , ** (extra_headers or {})}
1269
1269
return await self ._post (
@@ -1284,9 +1284,9 @@ async def completion(
1284
1284
options = make_request_options (
1285
1285
extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
1286
1286
),
1287
- cast_to = CompletionResponse ,
1287
+ cast_to = UnnamedTypeWithNoPropertyInfoOrParent0 ,
1288
1288
stream = stream or False ,
1289
- stream_cls = AsyncStream [CompletionResponse ],
1289
+ stream_cls = AsyncStream [UnnamedTypeWithNoPropertyInfoOrParent0 ],
1290
1290
)
1291
1291
1292
1292
@typing_extensions .deprecated ("/v1/inference/embeddings is deprecated. Please use /v1/openai/v1/embeddings." )
0 commit comments