chainlit
chainlit copied to clipboard
missing "threadId" column in "feedbacks" table from example script used in SQL alchemy data layer
trafficstars
Describe the bug The current example SQL script in the documentation that creates all the tables for the SQL alchemy data layer it's missing the ""threadId" column in the "feedbacks" table
To Reproduce Steps to reproduce the behavior:
- follow the procedure described at https://docs.chainlit.io/data-persistence/custom
- create a new chat
- type a message
- try to give a feedback
- you will get this error and feedback won't be saved
2024-06-12 12:29:30 - An error occurred: (sqlalchemy.dialects.postgresql.asyncpg.ProgrammingError) <class 'asyncpg.exceptions.UndefinedColumnError'>: la colonna "threadId" della relazione "feedbacks" non esiste
[SQL:
INSERT INTO feedbacks ("forId", "threadId", "value", "id", "comment")
VALUES ($1, $2, $3, $4, $5)
ON CONFLICT (id) DO UPDATE
SET "forId" = $1, "threadId" = $2, "value" = $3, "comment" = $5;
]
[parameters: ('626fbced-fc21-43c0-82b9-baddbda06cb3', 'a0eb5eec-7c1c-4c5f-ab77-e48c448c5827', 0, '257ba504-0b12-4314-a15b-17bcbaf78f58', 'tdhdth')]
(Background on this error at: https://sqlalche.me/e/20/f405)
Expected behavior The feedback should be saved
Desktop (please complete the following information):
- OS: Windows 11 Pro
- Browser: Microsoft Edge
Additional context I fixed the problem updating the SQL example script, that i'll post below