mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 11:43:54 +00:00
fix types on tools.py
This commit is contained in:
parent
2f8ee94827
commit
19aa86168d
2 changed files with 40 additions and 65 deletions
|
@ -1,5 +1,5 @@
|
|||
import json
|
||||
from typing import List, Literal, Union
|
||||
from typing import Dict, List, Literal, Union
|
||||
|
||||
from mcp import ClientSession
|
||||
from mcp.types import CallToolRequestParams as MCPCallToolRequestParams
|
||||
|
@ -77,7 +77,7 @@ def _get_function_arguments(function: FunctionDefinition) -> dict:
|
|||
|
||||
|
||||
def transform_openai_tool_call_request_to_mcp_tool_call_request(
|
||||
openai_tool: ChatCompletionMessageToolCall,
|
||||
openai_tool: Union[ChatCompletionMessageToolCall, Dict],
|
||||
) -> MCPCallToolRequestParams:
|
||||
"""Convert an OpenAI ChatCompletionMessageToolCall to an MCP CallToolRequestParams."""
|
||||
function = openai_tool["function"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue