llm

parse.llm

Functions

Name Description
convert2yaml Converts the data instance to a YAML file.
extract_data Extracts data using the OpenAI API.

convert2yaml

parse.llm.convert2yaml(data_instance, fname=None)

Converts the data instance to a YAML file. Args: data_instance (dict): The data instance to be converted. Returns: str: The YAML representation of the data instance.

extract_data

parse.llm.extract_data(text, model='gpt-4o', expected_experiments=None)

Extracts data using the OpenAI API. Args: text (str): The input text to be processed. model (str, optional): The model to be used for processing. Defaults to “gpt-4o”. Returns: dict: The extracted data instance.