|
2 | 2 |
|
3 | 3 | from __future__ import annotations
|
4 | 4 |
|
5 |
| -from typing import Any, Dict, List, Union, Iterable, cast |
| 5 | +from typing import Any, Dict, Union, Iterable, cast |
6 | 6 | from typing_extensions import Literal, overload
|
7 | 7 |
|
8 | 8 | import httpx
|
9 | 9 |
|
10 |
| -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven |
| 10 | +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven, SequenceNotStr |
11 | 11 | from ..._utils import required_args, maybe_transform, async_maybe_transform
|
12 | 12 | from ..._compat import cached_property
|
13 | 13 | from ..._resource import SyncAPIResource, AsyncAPIResource
|
@@ -68,7 +68,7 @@ def create(
|
68 | 68 | presence_penalty: float | NotGiven = NOT_GIVEN,
|
69 | 69 | response_format: completion_create_params.ResponseFormat | NotGiven = NOT_GIVEN,
|
70 | 70 | seed: int | NotGiven = NOT_GIVEN,
|
71 |
| - stop: Union[str, List[str]] | NotGiven = NOT_GIVEN, |
| 71 | + stop: Union[str, SequenceNotStr[str]] | NotGiven = NOT_GIVEN, |
72 | 72 | stream: Literal[False] | NotGiven = NOT_GIVEN,
|
73 | 73 | stream_options: Dict[str, Union[bool, float, str, Iterable[object], object, None]] | NotGiven = NOT_GIVEN,
|
74 | 74 | temperature: float | NotGiven = NOT_GIVEN,
|
@@ -167,7 +167,7 @@ def create(
|
167 | 167 | presence_penalty: float | NotGiven = NOT_GIVEN,
|
168 | 168 | response_format: completion_create_params.ResponseFormat | NotGiven = NOT_GIVEN,
|
169 | 169 | seed: int | NotGiven = NOT_GIVEN,
|
170 |
| - stop: Union[str, List[str]] | NotGiven = NOT_GIVEN, |
| 170 | + stop: Union[str, SequenceNotStr[str]] | NotGiven = NOT_GIVEN, |
171 | 171 | stream_options: Dict[str, Union[bool, float, str, Iterable[object], object, None]] | NotGiven = NOT_GIVEN,
|
172 | 172 | temperature: float | NotGiven = NOT_GIVEN,
|
173 | 173 | tool_choice: Union[str, Dict[str, Union[bool, float, str, Iterable[object], object, None]]]
|
@@ -265,7 +265,7 @@ def create(
|
265 | 265 | presence_penalty: float | NotGiven = NOT_GIVEN,
|
266 | 266 | response_format: completion_create_params.ResponseFormat | NotGiven = NOT_GIVEN,
|
267 | 267 | seed: int | NotGiven = NOT_GIVEN,
|
268 |
| - stop: Union[str, List[str]] | NotGiven = NOT_GIVEN, |
| 268 | + stop: Union[str, SequenceNotStr[str]] | NotGiven = NOT_GIVEN, |
269 | 269 | stream_options: Dict[str, Union[bool, float, str, Iterable[object], object, None]] | NotGiven = NOT_GIVEN,
|
270 | 270 | temperature: float | NotGiven = NOT_GIVEN,
|
271 | 271 | tool_choice: Union[str, Dict[str, Union[bool, float, str, Iterable[object], object, None]]]
|
@@ -362,7 +362,7 @@ def create(
|
362 | 362 | presence_penalty: float | NotGiven = NOT_GIVEN,
|
363 | 363 | response_format: completion_create_params.ResponseFormat | NotGiven = NOT_GIVEN,
|
364 | 364 | seed: int | NotGiven = NOT_GIVEN,
|
365 |
| - stop: Union[str, List[str]] | NotGiven = NOT_GIVEN, |
| 365 | + stop: Union[str, SequenceNotStr[str]] | NotGiven = NOT_GIVEN, |
366 | 366 | stream: Literal[False] | Literal[True] | NotGiven = NOT_GIVEN,
|
367 | 367 | stream_options: Dict[str, Union[bool, float, str, Iterable[object], object, None]] | NotGiven = NOT_GIVEN,
|
368 | 368 | temperature: float | NotGiven = NOT_GIVEN,
|
@@ -549,7 +549,7 @@ async def create(
|
549 | 549 | presence_penalty: float | NotGiven = NOT_GIVEN,
|
550 | 550 | response_format: completion_create_params.ResponseFormat | NotGiven = NOT_GIVEN,
|
551 | 551 | seed: int | NotGiven = NOT_GIVEN,
|
552 |
| - stop: Union[str, List[str]] | NotGiven = NOT_GIVEN, |
| 552 | + stop: Union[str, SequenceNotStr[str]] | NotGiven = NOT_GIVEN, |
553 | 553 | stream: Literal[False] | NotGiven = NOT_GIVEN,
|
554 | 554 | stream_options: Dict[str, Union[bool, float, str, Iterable[object], object, None]] | NotGiven = NOT_GIVEN,
|
555 | 555 | temperature: float | NotGiven = NOT_GIVEN,
|
@@ -648,7 +648,7 @@ async def create(
|
648 | 648 | presence_penalty: float | NotGiven = NOT_GIVEN,
|
649 | 649 | response_format: completion_create_params.ResponseFormat | NotGiven = NOT_GIVEN,
|
650 | 650 | seed: int | NotGiven = NOT_GIVEN,
|
651 |
| - stop: Union[str, List[str]] | NotGiven = NOT_GIVEN, |
| 651 | + stop: Union[str, SequenceNotStr[str]] | NotGiven = NOT_GIVEN, |
652 | 652 | stream_options: Dict[str, Union[bool, float, str, Iterable[object], object, None]] | NotGiven = NOT_GIVEN,
|
653 | 653 | temperature: float | NotGiven = NOT_GIVEN,
|
654 | 654 | tool_choice: Union[str, Dict[str, Union[bool, float, str, Iterable[object], object, None]]]
|
@@ -746,7 +746,7 @@ async def create(
|
746 | 746 | presence_penalty: float | NotGiven = NOT_GIVEN,
|
747 | 747 | response_format: completion_create_params.ResponseFormat | NotGiven = NOT_GIVEN,
|
748 | 748 | seed: int | NotGiven = NOT_GIVEN,
|
749 |
| - stop: Union[str, List[str]] | NotGiven = NOT_GIVEN, |
| 749 | + stop: Union[str, SequenceNotStr[str]] | NotGiven = NOT_GIVEN, |
750 | 750 | stream_options: Dict[str, Union[bool, float, str, Iterable[object], object, None]] | NotGiven = NOT_GIVEN,
|
751 | 751 | temperature: float | NotGiven = NOT_GIVEN,
|
752 | 752 | tool_choice: Union[str, Dict[str, Union[bool, float, str, Iterable[object], object, None]]]
|
@@ -843,7 +843,7 @@ async def create(
|
843 | 843 | presence_penalty: float | NotGiven = NOT_GIVEN,
|
844 | 844 | response_format: completion_create_params.ResponseFormat | NotGiven = NOT_GIVEN,
|
845 | 845 | seed: int | NotGiven = NOT_GIVEN,
|
846 |
| - stop: Union[str, List[str]] | NotGiven = NOT_GIVEN, |
| 846 | + stop: Union[str, SequenceNotStr[str]] | NotGiven = NOT_GIVEN, |
847 | 847 | stream: Literal[False] | Literal[True] | NotGiven = NOT_GIVEN,
|
848 | 848 | stream_options: Dict[str, Union[bool, float, str, Iterable[object], object, None]] | NotGiven = NOT_GIVEN,
|
849 | 849 | temperature: float | NotGiven = NOT_GIVEN,
|
|
0 commit comments