Skip to content

reference_utils

references_from_artifacts(artifacts)

Source code in griptape/utils/reference_utils.py
def references_from_artifacts(artifacts: list[TextArtifact]) -> list[Reference]:
    references = []

    for a in artifacts:
        if a.reference is not None and a.reference not in references:
            references.append(a.reference)

    return references