----------------------
To print the citations over the response, you can use the
source_nodes
attribute of the response object. Each
source_node
represents a citation that was used to construct the response. Here's an example of how you can do it:
# Show cited passages that were used to construct the response.
for cited_text in [node.text for node in response.source_nodes]:
print(f"Cited text: {cited_text}")
This code will iterate over the
source_nodes
of the response, which contain the citations, and print each one.
You can find this information in the following knowledge source:
source ()
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------