fml_doc_gen.autogen =================== .. py:module:: fml_doc_gen.autogen Functions --------- .. autoapisummary:: fml_doc_gen.autogen.fill_docstring_with_ai Module Contents --------------- .. py:function:: fill_docstring_with_ai(docstring_template: str, function_source: str) -> str Generates a detailed docstring for a given function source by filling in a provided template using OpenAI's language model. :param docstring_template: The docstring template with placeholders for descriptions. :type docstring_template: str :param function_source: The source code of the function to extract context. :type function_source: str :returns: The completed docstring with detailed descriptions. :rtype: str :raises ValueError: If either `docstring_template` or `function_source` is empty. :raises RuntimeError: If the API request fails or returns an unexpected response.