concepts.language.openai_utils.llm_prompting_utils.extract_tag#

extract_tag(content, tag, unique=False)[source]#

Extract all matched content inside <tag></tag>.

Parameters:
  • content (str) – the input string.

  • tag (str) – the tag name.

  • unique (bool) – if True, only return the first matched content and raises an error.

Return type:

str | List[str]