oh gotcha so if no tables not much use?
Would you know how to view only meta data extractions from the transformations. when the nodes are retrieved?
Not sure this the optimal way to do it
async def main(message: cl.Message):
chat_engine = cl.user_session.get("chat_engine")
response = await cl.make_async(chat_engine.chat)(message.content)
response_message = cl.Message(content=response.response)
await response_message.send()
elements = [] # Initialize an empty list to collect elements
label_list = []
for count, sr in enumerate(response.source_nodes, start=1):
metadata = sr.node.get_content(metadata_mode=MetadataMode.LLM)
content = sr.node.text # Adjust based on actual method to get content
# Create a cl.Text element for each source node and add it to the elements ist
element = cl.Text(
name="S" + str(count),
content=f"Content: {content},\nMetadata: {metadata}",
display="side", # Adjust display as needed
size='small', # Adjust size as needed
color='black', # Adjust color as needed
font_style='arial' # Adjust font style as needed
)
elements.append(element) # Add the created element to the list
label_list.append("S" + str(count))