mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-12 03:48:56 +00:00
fix(decisions): import assert_never from typing_extensions for Python 3.10
Backport of the #45184 follow-up to stable/1.104.x.
Cherry-picked from 29e715473c (litellm_systemone_endpoint).
This commit is contained in:
parent
c24cbf6442
commit
77d57c3948
1 changed files with 4 additions and 4 deletions
|
|
@ -1,5 +1,7 @@
|
|||
from collections.abc import Mapping, Sequence
|
||||
from typing import Final, assert_never
|
||||
from typing import Final
|
||||
|
||||
from typing_extensions import assert_never
|
||||
|
||||
from litellm.types.decisions import (
|
||||
ChoiceAnswer,
|
||||
|
|
@ -66,9 +68,7 @@ def _systemone_question(question: OpenAIDecisionQuestion) -> Mapping[str, object
|
|||
assert_never(question)
|
||||
|
||||
|
||||
def to_systemone_request(
|
||||
request_data: Mapping[str, object], body: OpenAIDecisionRequestBody
|
||||
) -> Mapping[str, object]:
|
||||
def to_systemone_request(request_data: Mapping[str, object], body: OpenAIDecisionRequestBody) -> Mapping[str, object]:
|
||||
return {
|
||||
**{key: value for key, value in request_data.items() if key not in _OPENAI_ONLY_FIELDS},
|
||||
"state": _state(body.input),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue