# convert_pydantic_to_ernie_function

> **Function** in `langchain_community`

📖 [View in docs](https://reference.langchain.com/python/langchain-community/utils/ernie_functions/convert_pydantic_to_ernie_function)

Convert a Pydantic model to a function description for the Ernie API.

## Signature

```python
convert_pydantic_to_ernie_function(
    model: Type[BaseModel],
    *,
    name: Optional[str] = None,
    description: Optional[str] = None,
) -> FunctionDescription
```

---

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