Quansight / ragna

RAG orchestration framework ⛵️
https://ragna.chat
BSD 3-Clause "New" or "Revised" License
181 stars 22 forks source link

Fix MetadataFilter formatting in chat info side bar #504

Open pmeier opened 2 months ago

pmeier commented 2 months ago

_Reported in https://github.com/Quansight/ragna/pull/499#discussion_r1745589754._


The snippet below does not honor the indentation

https://github.com/Quansight/ragna/blob/9221bb8d67b5002abd42a6fc985a017b7aa0072f/ragna/deploy/_ui/central_view.py#L208-L210

image

form ragna.core import MetadataFilter

print(MetadataFilter.and_([MetadataFilter.in_("document_name", ["foo.md"])]))
AND(
  IN('document_name', ['foo.md']),
)
pmeier commented 4 days ago

We can just wrap into <pre>...</pre> to keep our formatting.