mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-07 07:58:09 +00:00
Merge be27808856 into 160a0b72cf
This commit is contained in:
commit
724eb83d5a
2 changed files with 4 additions and 2 deletions
|
|
@ -87,7 +87,9 @@ def _int_or_none(value: object) -> int | None:
|
|||
|
||||
def _asks_for_one_candidate(generation_config: Mapping[str, object]) -> bool:
|
||||
return all(
|
||||
_int_or_none(generation_config[key] or 1) == 1 for key in _CANDIDATE_COUNT_KEYS if key in generation_config
|
||||
generation_config[key] is None or _int_or_none(generation_config[key]) in (0, 1)
|
||||
for key in _CANDIDATE_COUNT_KEYS
|
||||
if key in generation_config
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ async def test_unary_long_decode_answers_under_the_first_requests_response_id(is
|
|||
|
||||
|
||||
@pytest.mark.parametrize("stream", [True, False])
|
||||
@pytest.mark.parametrize("sent_as_a_string", [{"n": "1"}, {"max_tokens": "100000"}])
|
||||
@pytest.mark.parametrize("sent_as_a_string", [{"n": "1"}, {"n": ""}, {"max_tokens": "100000"}])
|
||||
@pytest.mark.asyncio
|
||||
async def test_request_whose_n_or_max_tokens_is_a_string_is_sent_once_and_never_continued(
|
||||
stream: bool, sent_as_a_string: Mapping[str, str]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue