Methods for creating chains that use Ernie function-calling APIs.
Convert a Pydantic model to a function description for the Ernie API.
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.
Convert a raw function/class to an Ernie function.
Get the appropriate function output parser given the user functions.
Create a runnable sequence that uses Ernie functions.
Create a runnable that uses an Ernie function to get a structured output.
[Legacy] Create an LLM chain that uses Ernie functions.
[Legacy] Create an LLMChain that uses an Ernie function to get a structured output.