Release notes
Version 0.2.0
Feature changes and enhancements
- Ragna's
0.1.x
releases were built on a task queue backend. This turned out to be a premature optimization that limited us in other features we wanted to implement. Thus, we removed it without impacting the API. This enabled us to add two new features:- The abstract methods on the RAG components, i.e. ragna.core.SourceStorage.store,
ragna.core.SourceStorage.retrieve, and ragna.core.Assistant.answer, can now
also be declared as
async def
. Asynchronous methods will be called on the main event loop while the synchronous methods (def
) will be called in a separate thread to avoid blocking the main thread. - ragna.core.Assistant.answer now returns iterator, which allows streaming an answer. Check out the streaming example to learn how you can stream answers from the Python and REST API. The Ragna web UI will always stream to enhance the UX.
- The abstract methods on the RAG components, i.e. ragna.core.SourceStorage.store,
ragna.core.SourceStorage.retrieve, and ragna.core.Assistant.answer, can now
also be declared as
- Ragna gained support for Markdown (
.md
), Microsoft Word (.docx
), and Microsoft Powerpoint (.pptx
) documents. -
Ragna now has an official docker image. Try it with
$ docker run -p 31476:31476 -p 31477:31477 quay.io/quansight/ragna:0.2.0
The web UI can be accessed under
http://localhost:31477
.
- Instead of just returning the location of a source, e.g. page numbers in a PDF document but potentially nothing for other formats that don't have this kind of information, the REST API now also returns the full source content. This aligns it with the Python API. The source view in the web UI now also shows the source content.
Breaking Changes
- As a result of the removal of the task queue,
ragna worker
is no longer needed and was removed. The same applies to the--start-worker
option ofragna api
and thequeue_url
configuration option (see below). - The return type of ragna.core.Assistant.answer changed from
str
toIterator[str]
/AsyncIterator[str]
. To reflect that in the implementation, replacereturn
withyield
. To stream the response,yield
multiple times. - The abstract property
ragna.core.Assistant.max_input_size
was removed. This information was never used anywhere. Note that you don't have to remove it from existing implementations. It will just stay unused by Ragna. -
We introduced a couple of changes to the configuration file.
- The top level
local_cache_root
option was renamed tolocal_root
to align with the new ragna.local_root function. - The
[core]
section was dissolved and its options merged into the top level. Thequeue_url
option was removed. - The
authentication
option was moved from the[api]
section to the top level. - Both the
[api]
and[ui]
section gained ahostname
andport
parameter that are used to bind the application. Theurl
option, previously used for the same purpose, option was removed from the[ui]
section. It was retained in the[api]
section, but now only indicates the URL the REST API can be contacted on, e.g. by the web UI, and has no effect on how the REST API is bound. - The default value of
database_url
in the[api]
section changed to use a persistent database by default. The"memory"
option is no longer available. Usesqlite://
if you want to retain the non-persistent behavior. - The
[api]
section gained a newroot_path
option to help deploying Ragna behind a proxy. By default, the behavior does not change compared to before.
Below you can find a comparison between two equivalent configuration files
v0.1.3 local_cache_root = "/home/user/.cache/ragna" [core] queue_url = "memory" document = "ragna.core.LocalDocument" source_storages = [ "ragna.source_storages.Chroma", ... ] assistants = [ "ragna.assistants.Claude", ... ] [api] url = "http://127.0.0.1:31476" origins = ["http://127.0.0.1:31477"] database_url = "memory" authentication = "ragna.core.RagnaDemoAuthentication" [ui] url = "http://127.0.0.1:31477" origins = ["http://127.0.0.1:31477"]
v0.2.0 local_root = "/home/user/.cache/ragna" authentication = "ragna.deploy.RagnaDemoAuthentication" document = "ragna.core.LocalDocument" source_storages = [ "ragna.source_storages.Chroma", ... ] assistants = [ "ragna.assistants.Claude", ... ] [api] hostname = "127.0.0.1" port = 31476 root_path = "" url = "http://127.0.0.1:31476" origins = [ "http://127.0.0.1:31477", ] database_url = "sqlite://" [ui] hostname = "127.0.0.1" port = 31477 origins = [ "http://127.0.0.1:31477", ]
- The top level
- The classes ragna.deploy.Authentication, ragna.deploy.RagnaDemoAuthentication, and ragna.deploy.Config moved from the ragna.core module to a new ragna.deploy module.
-
ragna.core.Component, which is the superclass for ragna.core.Assistant and ragna.core.SourceStorage, no longer takes a ragna.deploy.Config to instantiate. For example
class MyAssistant(ragna.core.Assistant): def __init__(self, config): super().__init__(config)
needs to change to
class MyAssistant(ragna.core.Assistant): def __init__(self): super().__init__()
You can use the new ragna.local_root function as replacement for
config.local_root
if needed.
- The database scheme changed and is no longer compatible with the tables used in
previous releases. The default database set by the configuration wizard is located at
~/.cache/ragna/ragna.db
. Please delete it. It will be created anew the next time the REST API is started. - The
/chat/{chat_id}/prepare
and/chat/{chat_id}/answer
endpoints of the REST API now no longer return the chat object, but only the message.
What's Changed
- fix note in Ragna 101 by @pmeier in #187
- make config optional when creating a component by @pmeier in #194
- fix Config source priority and add tests by @pmeier in #200
- add smoke tests for source storages by @pmeier in #201
- docs: improvements to REST API tutorial by @agilgur5 in #198
- remove task queue by @pmeier in #205
- remove [BUG] and [ENH] classifier from issue templates by @pmeier in #228
- Fix timeouts by @pmeier in #234
- don't return full chat as part of message output by @pmeier in #249
- code quality improvements of the API wrapper by @pmeier in #250
- add functionality to format CSS stylesheets by @pmeier in #257
- Cleanup UI code by @pmeier in #261
- Add support for markdown files (#210) by @paskett in #270
- fix source view on messages that were generated in a previous session by @pmeier in #273
- add forward slashes to the auth and logout endpoints by @pmeier in #276
- implement streaming for assistants by @pmeier in #215
- return source content from the REST API by @pmeier in #264
- Fix environment-dev.yml by @nenb in #282
- Support using .docx files by @paskett in #281
- dockerize by @pmeier in #283
- add workflow to update the docker requirements by @pmeier in #287
- add write permissions for GHA bot by @pmeier in #288
- add workflow actor as reviewer rather than assignee by @pmeier in #293
- Fix relative path handling for ragna panel app by @aktech in #280
- Pptx support by @davidedigrande in #296
- Increase API timeout and add custom message by @smokestacklightnin in #299
- add Google assistants by @pmeier in #301
- RTD git debug by @pmeier in #302
- bump minimum panel version to 1.3.8 by @pmeier in #284
- move BC policy into documentation by @pmeier in #309
- remove invalid font CSS declaration by @pmeier in #308
- make arrays in config multiline by @pmeier in #311
- [ENH] - add support for Cohere assistants by @smokestacklightnin in #307
- fix invalid escape warning when building docs by @pmeier in #314
- [ENH] - Add support for AI21labs assistants by @smokestacklightnin in #303
- re-add Authentication documentation by @pmeier in #316
- Set up git-lfs and track relevant files by @pavithraes in #315
- document default login credentials by @pmeier in #168
- Remove duplicate call to answer method when not streaming by @nenb in #325
- use truly-sane-lists plugin by @pmeier in #324
- use FastAPI test client for testing by @pmeier in #322
- update outdated actions by @pmeier in #321
- remove memory option for state db by @pmeier in #320
- only send sources on first chunk when streaming by @pmeier in #317
- refactor config docs by @pmeier in #318
- restrict accepted files in file uploader by @pmeier in #319
- add 'why should I use Ragna?' to FAQ by @pmeier in #335
- ignore httpx deprecation warning by @pmeier in #342
- use mkdocs-gallery for example / tutorial documentation by @pmeier in #89
- set LanceDB config dir in Dockerfile by @pmeier in #330
- Prevent creation of large _stylesheet class variable by @nenb in #341
- Config refactor by @pmeier in #328
- add option to not open the browser when starting the web UI by @pmeier in #345
- use root_path in api.url by @pmeier in #346
- Add option to ignore unavailable components by @pmeier in #333
- decrease default number of tokens in UI by @pmeier in #351
- improve error handling for builtin assistants by @pmeier in #350
- add test for a streaming assistant by @pmeier in #349
- remove max_input_size property from assistants by @pmeier in #362
- Add overview video to docs & README by @pavithraes in #363
- fix typo in FAQ by @pmeier in #348
- fix release notes link in project metadata by @pmeier in #361
- break recursion cycle for chat message repr by @pmeier in #360
- use JSONL streaming over SSE by @pmeier in #357
New Contributors
- @paskett made their first contribution in #270
- @aktech made their first contribution in #280
- @davidedigrande made their first contribution in #296
- @smokestacklightnin made their first contribution in #299
Version 0.1.3
What's Changed
- fix large upload by @peachkeel in #244
- Fix rendering of chat info button @nenb in #252
- Bump panel minimum version by @nenb in #259
New Contributors
- @peachkeel made their first contribution in #244
- @nenb made their first contribution in #252
Version 0.1.2
Breaking changes
-
The
/document
endpoints on the REST API have changed- The
GET /document
endpoint of the REST API to register the document and get the upload information changed toPOST /document
. The document name now needs to be passed as part of the body as JSON rather than as query parameter. - The JSON object returned by the new
POST /document
endpoint of the REST API now bundles theurl
anddata
fields under oneparameters
fields. In addition, theparameters
field also now includes amethod
field that specifies how the upload request should be sent. - The
POST /document
endpoint of the REST API to upload documents stored locally changed toPUT /document
.
For example
document_upload = client.get("/document", params={"name": name}).json() client.post( document_upload["url"], data=document_upload["data"], files={"file": ...}, )
needs to change to
document_upload = client.post("/document", json={"name": name}).json() parameters = document_upload["parameters"] client.request( parameters["method"], parameters["url"], data=parameters["data"], files={"file": ...}, )
- The
What's Changed
- pin pymupdf to latest release by @pmeier in #169
- Update assistant timeout to accomodate longer response time. by @petrpan26 in #184
- cache importlib_metadata_package_distributions by @pmeier in #188
- fix LanceDB retrieval by @pmeier in #195
- use model_config over Config class by @pmeier in #199
- special case LocalDocument more by @pmeier in #170
- docs: small improvements to "Set Configuration" how-to by @agilgur5 in #197
- docs: various improvements to Python API tutorial by @agilgur5 in #196
- fix chat info by @pmeier in #220
- change version scheme to increase the minor instead of patch version by @pmeier in #221
- run CI on release branches by @pmeier in #222
- mark as PEP561 compatible by @pmeier in #232
- set hard limit of visible document pills by @pmeier in #235
- supply document name as part of the request body rather than query by @pmeier in #186
- Make document upload method flexible by @pmeier in #238
New Contributors
- @petrpan26 made their first contribution in #184
- @agilgur5 made their first contribution in #197
Version 0.1.1
Feature changes and enhancements
- The optional dependencies needed for the builtin components are now available under
the
'all'
key. Please install Ragna withpip install 'ragna[all]'
. - The functionality of
ragna config
andragna config --check
was split into two commands:ragna init
andragna check
. Useragna init
to start the configuration creation wizard and create a configuration file.ragna check
is used to check the availability of the selected components in an existing configuration file. - In the default configuration,
ragna ui
now starts withRagnaDemoAuthentication
enabled. To login, you can use an arbitrary username and the same string for the password as well. For example, leaving both fields blank allows you to login.
Breaking Changes
- The command
ragna config
was removed. Useragna init
to create a configuration file andragna check
to check it. - The special options
'builtin'
(former default) and'demo'
were removed from the Ragna CLI. Now a configuration file is required and can be created byragna init
. Note that by default all subcommands will automatically use theragna.toml
file in the current working directory in case it exists if the-c
/--config
flag is not used. - The configuration options
config.api.upload_token_secret
andconfig.api.upload_token_ttl
were removed. The former can now only be configured with theRAGNA_API_DOCUMENT_UPLOAD_SECRET
environment variable and the latter is now fixed at 5 minutes. If you want to keep using your generated configuration files, please delete theupload_token_secret
andupload_token_ttl
keys in the[api]
section.
What's Changed
- forward subprocess STDOUT / STDERR to main process by @pmeier in #123
- quote the builtin install instructions by @pmeier in #122
- fix chroma only retrieving one source by @pmeier in #132
- fix chat param unpacking by @pmeier in #133
- refactor config wizard by @pmeier in #125
- dont create DB session as dependency by @pmeier in #138
- allow API token secret to be set through env var by @pmeier in #141
- Auth + async answer + loading indicator in placeholder by @pierrotsmnrd in #135
- Recommend [builtin] for installation by @pavithraes in #134
- make DB connect_args type specific by @pmeier in #139
- only display unmet packages and env vars of the selected components by @pmeier in #140
- add plausible analytics by @pmeier in #143
- clarify demo assistant message by @pmeier in #147
- fix Ragna 101 by @pmeier in #146
- config quick fix : disable sliders if "Ragna/Demo" by @pierrotsmnrd in #155
- Make API / UI origins configurable by @pmeier in #149
- add prominent note about LLM access and instructions on how to get keys by @pmeier in #159
- Update README.md by @pavithraes in #154
- Add testing for docs by @pavithraes in #151
- add print for demo auth by @pmeier in #157
- Up the number of queried documents by Chroma by @pmeier in #160
- Add announcement banner with link to blog by @pavithraes in #164
New Contributors
- @pierrotsmnrd made their first contribution in #135
Version 0.1.0
Initial release. Read the launch blog post here.