langchain_community.chains.ernie_functions.base
.convert_python_function_to_ernie_function¶
- langchain_community.chains.ernie_functions.base.convert_python_function_to_ernie_function(function: Callable) Dict[str, Any] [source]¶
将Python函数转换为与Ernie函数调用API兼容的字典。
假设Python函数具有类型提示和带有描述的文档字符串。如果文档字符串具有Google Python风格的参数描述,这些描述也将被包含在内。
- Parameters
function (Callable) –
- Return type
Dict[str, Any]