# convert_python_function_to_ernie_function

> **Function** in `langchain_community`

📖 [View in docs](https://reference.langchain.com/python/langchain-community/chains/ernie_functions/base/convert_python_function_to_ernie_function)

Convert a Python function to an Ernie function-calling API compatible dict.

Assumes the Python function has type hints and a docstring with a description. If
    the docstring has Google Python style argument descriptions, these will be
    included as well.

## Signature

```python
convert_python_function_to_ernie_function(
    function: Callable,
) -> Dict[str, Any]
```

---

[View source on GitHub](https://github.com/langchain-ai/langchain-community/blob/4b280287bd55b99b44db2dd849f02d66c89534d5/libs/community/langchain_community/chains/ernie_functions/base.py#L123)