Merge pull request #3080 from danswer-ai/robust_assistant_description

Account for malformatted starter messages
This commit is contained in:
rkuo-danswer 2024-11-08 11:28:19 -08:00 committed by GitHub
commit 950b1c38f2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -26,7 +26,8 @@ def upgrade() -> None:
FROM jsonb_array_elements(starter_messages) elem
)
WHERE starter_messages IS NOT NULL
"""
AND jsonb_typeof(starter_messages) = 'array'
"""
)
)
@ -41,6 +42,7 @@ def downgrade() -> None:
FROM jsonb_array_elements(starter_messages) elem
)
WHERE starter_messages IS NOT NULL
"""
AND jsonb_typeof(starter_messages) = 'array'
"""
)
)