2727)
2828from .._streaming import Stream , AsyncStream
2929from .._base_client import make_request_options
30+ from ..types .completion_response import CompletionResponse
3031from ..types .embeddings_response import EmbeddingsResponse
3132from ..types .shared_params .message import Message
3233from ..types .shared .batch_completion import BatchCompletion
33- from ..types .inference_completion_params import UnnamedTypeWithNoPropertyInfoOrParent0
3434from ..types .shared_params .response_format import ResponseFormat
3535from ..types .shared_params .sampling_params import SamplingParams
3636from ..types .shared .chat_completion_response import ChatCompletionResponse
@@ -467,7 +467,7 @@ def completion(
467467 extra_query : Query | None = None ,
468468 extra_body : Body | None = None ,
469469 timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
470- ) -> UnnamedTypeWithNoPropertyInfoOrParent0 :
470+ ) -> CompletionResponse :
471471 """
472472 Generate a completion for the given content using the specified model.
473473
@@ -514,7 +514,7 @@ def completion(
514514 extra_query : Query | None = None ,
515515 extra_body : Body | None = None ,
516516 timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
517- ) -> Stream [UnnamedTypeWithNoPropertyInfoOrParent0 ]:
517+ ) -> Stream [CompletionResponse ]:
518518 """
519519 Generate a completion for the given content using the specified model.
520520
@@ -561,7 +561,7 @@ def completion(
561561 extra_query : Query | None = None ,
562562 extra_body : Body | None = None ,
563563 timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
564- ) -> UnnamedTypeWithNoPropertyInfoOrParent0 | Stream [UnnamedTypeWithNoPropertyInfoOrParent0 ]:
564+ ) -> CompletionResponse | Stream [CompletionResponse ]:
565565 """
566566 Generate a completion for the given content using the specified model.
567567
@@ -608,7 +608,7 @@ def completion(
608608 extra_query : Query | None = None ,
609609 extra_body : Body | None = None ,
610610 timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
611- ) -> UnnamedTypeWithNoPropertyInfoOrParent0 | Stream [UnnamedTypeWithNoPropertyInfoOrParent0 ]:
611+ ) -> CompletionResponse | Stream [CompletionResponse ]:
612612 if stream :
613613 extra_headers = {"Accept" : "text/event-stream" , ** (extra_headers or {})}
614614 return self ._post (
@@ -629,9 +629,9 @@ def completion(
629629 options = make_request_options (
630630 extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
631631 ),
632- cast_to = UnnamedTypeWithNoPropertyInfoOrParent0 ,
632+ cast_to = CompletionResponse ,
633633 stream = stream or False ,
634- stream_cls = Stream [UnnamedTypeWithNoPropertyInfoOrParent0 ],
634+ stream_cls = Stream [CompletionResponse ],
635635 )
636636
637637 @typing_extensions .deprecated ("/v1/inference/embeddings is deprecated. Please use /v1/openai/v1/embeddings." )
@@ -1122,7 +1122,7 @@ async def completion(
11221122 extra_query : Query | None = None ,
11231123 extra_body : Body | None = None ,
11241124 timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
1125- ) -> UnnamedTypeWithNoPropertyInfoOrParent0 :
1125+ ) -> CompletionResponse :
11261126 """
11271127 Generate a completion for the given content using the specified model.
11281128
@@ -1169,7 +1169,7 @@ async def completion(
11691169 extra_query : Query | None = None ,
11701170 extra_body : Body | None = None ,
11711171 timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
1172- ) -> AsyncStream [UnnamedTypeWithNoPropertyInfoOrParent0 ]:
1172+ ) -> AsyncStream [CompletionResponse ]:
11731173 """
11741174 Generate a completion for the given content using the specified model.
11751175
@@ -1216,7 +1216,7 @@ async def completion(
12161216 extra_query : Query | None = None ,
12171217 extra_body : Body | None = None ,
12181218 timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
1219- ) -> UnnamedTypeWithNoPropertyInfoOrParent0 | AsyncStream [UnnamedTypeWithNoPropertyInfoOrParent0 ]:
1219+ ) -> CompletionResponse | AsyncStream [CompletionResponse ]:
12201220 """
12211221 Generate a completion for the given content using the specified model.
12221222
@@ -1263,7 +1263,7 @@ async def completion(
12631263 extra_query : Query | None = None ,
12641264 extra_body : Body | None = None ,
12651265 timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
1266- ) -> UnnamedTypeWithNoPropertyInfoOrParent0 | AsyncStream [UnnamedTypeWithNoPropertyInfoOrParent0 ]:
1266+ ) -> CompletionResponse | AsyncStream [CompletionResponse ]:
12671267 if stream :
12681268 extra_headers = {"Accept" : "text/event-stream" , ** (extra_headers or {})}
12691269 return await self ._post (
@@ -1284,9 +1284,9 @@ async def completion(
12841284 options = make_request_options (
12851285 extra_headers = extra_headers , extra_query = extra_query , extra_body = extra_body , timeout = timeout
12861286 ),
1287- cast_to = UnnamedTypeWithNoPropertyInfoOrParent0 ,
1287+ cast_to = CompletionResponse ,
12881288 stream = stream or False ,
1289- stream_cls = AsyncStream [UnnamedTypeWithNoPropertyInfoOrParent0 ],
1289+ stream_cls = AsyncStream [CompletionResponse ],
12901290 )
12911291
12921292 @typing_extensions .deprecated ("/v1/inference/embeddings is deprecated. Please use /v1/openai/v1/embeddings." )
0 commit comments