定义工具时,参数的定义
| 36 | |
| 37 | |
| 38 | class 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 | |
| 50 | class FunctionDefinition(BaseModel): |
nothing calls this directly
no outgoing calls
no test coverage detected