Elements
get_element
Get information for a specific element.
Parameters
conversation_id
str
The ID of the conversation to which the element belongs.
element_id
str
The ID of the element to retrieve information for.
Returns
element
Optional[ElementDict]
requiredThe element information if found, None otherwise.
Example
Code Example
from chainlit.client.cloud import chainlit_client
conversation_id = "12345"
element_id = "54321"
element = await chainlit_client.get_element(conversation_id, element_id)
if element:
print(f"Element ID: {element['id']}")
print(f"Type: {element['type']}")
print(f"Name: {element['name']}")
else:
print("No element found.")
Was this page helpful?