Translate LangChain Citations to Google AI grounding metadata format.
Example:
citations = [
create_citation(
url="https://uefa.com/euro2024",
title="UEFA Euro 2024 Results",
start_index=0,
end_index=47,
cited_text="Spain won the UEFA Euro 2024 championship",
)
]
metadata = translate_citations_to_grounding_metadata(citations)
len(metadata["groundingChunks"])
# -> 1
metadata["groundingChunks"][0]["web"]["uri"]
# -> 'https://uefa.com/euro2024'List of Citation content blocks.
Optional list of search queries that generated the grounding data.