MCPcopy Create free account
hub / github.com/Mercury7353/PyBench / ToolProperty

Class ToolProperty

llms/schema.py:38–47  ·  view source on GitHub ↗

定义工具时,参数的定义

Source from the content-addressed store, hash-verified

36
37
38class ToolProperty(BaseModel):
39 """定义工具时,参数的定义"""
40
41 type: DataType # 参数类别
42 description: Optional[str] = None # 参数描述
43 enum: Optional[List] = None # 枚举类时才有值
44 items: Optional[ToolProperty] = None # type == array时,items才有值
45 # type == object时,properties才有值
46 properties: Optional[Dict[str, ToolProperty]] = None
47 required: Optional[List[str]] = None # type == object时,required才有值
48
49
50class FunctionDefinition(BaseModel):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected