Quansight / ragna

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

support selecting corpus in web UI #492

Open pmeier opened 3 months ago

pmeier commented 3 months ago

With #487 merged, we need a way to select the corpus we want in the web UI. I suggest we just assume we have < 10 corpuses and thus use a dropdown menu. To fill it we need two more things:

  1. An endpoint on the API, i.e. GET /corpuses
  2. A new abstract method on the SourceStorage class, e.g. list_corpuses (name TBD).

    I'm not sure yet if we want to make it a strictly abstract, i.e. decorating with @abstractmethod, because that would require everyone to implement this even if one doesn't want to work with corpuses. Instead we could also leave it undecorated and raise NotImplementedError instead and thus pushing the check to runtime. Thoughts?

In addition, 2. also has to be implemented on builtin source storages.