def to_openai_function(pydantic_class: Type[BaseModel]) -> Dict[str, Any]:
    """Convert pydantic class to OpenAI function."""
    schema = pydantic_class.schema()
    return {
        "name": schema["title"],
        "description": schema["description"],
        "parameters": pydantic_class.schema(),
    }
Convert pydantic class to OpenAI function.
llama-index-integrations/llms/llama-index-llms-konko/llama_index/llms/konko/utils.py