I’m currently developing an app using Chainlit and have enabled feedback options with the Literal API key. While I can view all threads, steps, and feedback on the Literal AI dashboard, I need to fetch the feedback comments directly from the UI to a chainlitapp.py file for additional purposes.
Are there any direct functions or methods within Chainlit that allow for fetching and storing these feedback comments locally? Any guidance or examples would be greatly appreciated.
I have created a custom data layer in Chainlit to handle feedback.
Here’s the relevant part of my code:
class CustomDataLayer(cl_data.BaseDataLayer):
async def upsert_feedback(self, feedback: cl_data.Feedback) -> str:
return await super().upsert_feedback(feedback)
cl_data._data_layer = CustomDataLayer()
Within the upsert_feedback function, I can print the feedback provided, but I am unable to access this feedback object elsewhere in my chainlitapp.py file.
What I am expecting:
Guidance on how to access the feedback object outside the upsert_feedback function in my chainlitapp.py file.
vibhav dubey is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.