You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The resultant chat would be over all of the documents specified in the API call as well as any Documents tagged with one or more of the given tags at the time of chat creation.
Value and/or benefit
Introducing tags would be a step in the direction of making Ragna aware of corpora without the need for a heavyweight Corpus class. Having some concept of corpora in Ragna would be beneficial for a couple of reasons:
Breaks the tight coupling of chat creation and file uploading in the UI. Right now, if you want to upload a set of files and create multiple chats off of them, you need to use the API as hack to set up the UI for end-users ahead of time as per #176 (comment). Being able to upload tagged files and then, later, reference them during chat creation would empower users of the UI.
Reduces the burden of interacting with the API when dealing with a large number of files. When dealing with thousands of files, certain API calls can be quite laborious and slow. Being able to refer to a tag in such circumstances would make code more readable and decrease the amount of data being transmitted over the wire.
Anything else?
To implement tags, changes would probably be limited to the request bodies of the POST /document and POST /chats endpoints. Since documents with the same tag as the ones in an existing chat could be uploaded after the chat's existence, and these documents would not be in the existing chat, it probably makes little sense to change or expose the tags in any of the API's current response bodies.
The addition of a GET /documents/list endpoint and a GET /tags/list endpoint might also be necessary.
The text was updated successfully, but these errors were encountered:
Feature description
Add an optional
tags
attribute, perhaps of typelist[str]
, to theDocument
class and its corresponding schema.When files are uploaded via the API,
tags
could then be associated with them:Then, when creating a
chat
, one or moretags
could be specified either in lieu of or alongside ofdocuments
:The resultant
chat
would be over all of thedocuments
specified in the API call as well as anyDocuments
tagged with one or more of the giventags
at the time of chat creation.Value and/or benefit
Introducing tags would be a step in the direction of making Ragna aware of corpora without the need for a heavyweight
Corpus
class. Having some concept of corpora in Ragna would be beneficial for a couple of reasons:Anything else?
To implement tags, changes would probably be limited to the request bodies of the
POST /document
andPOST /chats
endpoints. Since documents with the same tag as the ones in an existing chat could be uploaded after the chat's existence, and these documents would not be in the existing chat, it probably makes little sense to change or expose the tags in any of the API's current response bodies.The addition of a
GET /documents/list
endpoint and aGET /tags/list
endpoint might also be necessary.The text was updated successfully, but these errors were encountered: