mirror of
https://github.com/BerriAI/litellm.git
synced 2026-08-28 05:25:59 +00:00
chore(lint): use a PEP 604 union for the flat tool_choice helper (UP007)
Some checks failed
LiteLLM Rust / rustfmt, clippy, test (push) Has been cancelled
Some checks failed
LiteLLM Rust / rustfmt, clippy, test (push) Has been cancelled
This commit is contained in:
parent
23d26d5e64
commit
eea9bb1497
1 changed files with 1 additions and 1 deletions
|
|
@ -141,7 +141,7 @@ def _tool_call_dict_from_output_item(item: Mapping[str, Any], index: int) -> _Ch
|
|||
return tool_call_dict
|
||||
|
||||
|
||||
def _flat_responses_tool_choice(choice_type: str, name: str) -> Union[ToolChoiceFunctionParam, ToolChoiceCustomParam]:
|
||||
def _flat_responses_tool_choice(choice_type: str, name: str) -> ToolChoiceFunctionParam | ToolChoiceCustomParam:
|
||||
if choice_type == "custom":
|
||||
return ToolChoiceCustomParam(type="custom", name=name)
|
||||
return ToolChoiceFunctionParam(type="function", name=name)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue