MCPcopy
hub / github.com/TaskingAI/TaskingAI / _validate_tools

Function _validate_tools

backend/app/operators/assistant/assistant.py:23–43  ·  view source on GitHub ↗

Validate tools :param tools: a list of assistant tools :param model: the assistant model :return:

(
    tools: List[ToolRef],
    model: Model,
)

Source from the content-addressed store, hash-verified

21
22
23async def _validate_tools(
24 tools: List[ToolRef],
25 model: Model,
26):
27 """
28 Validate tools
29 :param tools: a list of assistant tools
30 :param model: the assistant model
31 :return:
32 """
33 from app.services.tool import verify_tools
34
35 if not tools:
36 return
37
38 if not model.allow_function_call():
39 raise_request_validation_error(
40 f"The assistant's language model {model.model_id} does not support function call to use the tools.",
41 )
42
43 await verify_tools(tools)
44
45
46async def _validate_retrievals(

Callers 2

createMethod · 0.85
updateMethod · 0.85

Calls 3

verify_toolsFunction · 0.90
allow_function_callMethod · 0.45

Tested by

no test coverage detected