# get_ernie_output_parser

> **Function** in `langchain_community`

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

Get the appropriate function output parser given the user functions.

## Signature

```python
get_ernie_output_parser(
    functions: Sequence[Union[Dict[str, Any], Type[BaseModel], Callable]],
) -> Union[BaseOutputParser, BaseGenerationOutputParser]
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `functions` | `Sequence[Union[Dict[str, Any], Type[BaseModel], Callable]]` | Yes | Sequence where element is a dictionary, a pydantic.BaseModel class, or a Python function. If a dictionary is passed in, it is assumed to already be a valid Ernie function. |

## Returns

`Union[BaseOutputParser, BaseGenerationOutputParser]`

A PydanticOutputFunctionsParser if functions are Pydantic classes, otherwise
a JsonOutputFunctionsParser. If there's only one function and it is
not a Pydantic class, then the output parser will automatically extract
only the function arguments and not the function name.

---

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