Toggle Menu
Prev Up Next

# `langchain_core.utils.function_calling`.convert_pydantic_to_openai_tool

langchain_core.utils.function_calling.convert_pydantic_to_openai_tool(model: Type[BaseModel], *, name: Optional[str] = None, description: Optional[str] = None) → ToolDescription

  [Deprecated] Converts a Pydantic model to a function description for the OpenAI API.

  Notes

  Deprecated since version 0.1.16: Use langchain_core.utils.function_calling.convert_to_openai_tool() instead.

  Parameters

    - model (Type[BaseModel]) –

    - name (Optional[str]) –

    - description (Optional[str]) –

  Return type

    ToolDescription