curate_gpt.formatters package

Submodules

curate_gpt.formatters.format_utils module

curate_gpt.formatters.format_utils.camelify(text)

Convert text to camel case.

Parameters:

text (str)

Return type:

str

Returns:

curate_gpt.formatters.format_utils.object_as_yaml(obj)

Canonical YAML representation of an object.

  • no empty values

  • no sorting (default insertion order)

Parameters:

obj (Dict)

Return type:

str

Returns:

curate_gpt.formatters.format_utils.remove_formatting(text, expect_format='')

Remove markdown formatting from text if present.

Parameters:
  • text (str)

  • expect_format (str) – The expected format of the text, e.g., “json” (optional)

Return type:

str

Returns:

Module contents

Formats data objects for presentation to humans and machine agents.

Note: this package is not in heavy use just now.

Currently we remove identifiers from data objects before caching, and present the LLM with the same kind of view a human would see when using a curation tool like Protege.

In future, this will be separated, and the store will house the normalized representation, and this layer will handle presenting data to the LLM (or human) with IDs changed to labels.

TODO: will this also handle the reverse?