-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Philip Meier <[email protected]>
- Loading branch information
1 parent
3dad16b
commit 03721c7
Showing
19 changed files
with
123 additions
and
165 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,9 @@ | ||
# Ragna | ||
|
||
## Local install | ||
> **Note** | ||
> This project is in active development. | ||
```bash | ||
$ conda env create --file environment.yml | ||
$ conda activate ragna-dev | ||
$ pip install --editable '.[complete]' | ||
$ ragna --version | ||
$ ragna ls | ||
``` | ||
## Local development | ||
|
||
## Minimal example | ||
|
||
```python | ||
import asyncio | ||
|
||
from ragna import Rag | ||
from ragna.assistant import RagnaDemoAssistant | ||
from ragna.source_storage import RagnaDemoSourceStorage | ||
|
||
|
||
async def main(): | ||
rag = Rag() | ||
|
||
path = "ragna.txt" | ||
with open(path, "w") as file: | ||
file.write("Ragna is an OSS RAG app with Python and REST API.\n") | ||
|
||
async with await rag.new_chat( | ||
documents=[path], | ||
source_storage=RagnaDemoSourceStorage, | ||
assistant=RagnaDemoAssistant, | ||
) as chat: | ||
print(await chat.answer("What is Ragna?")) | ||
|
||
|
||
# This is only needed when running module as script. | ||
# If inside a notebook, the code inside the main function can be run directly. | ||
if __name__ == "__main__": | ||
asyncio.run(main()) | ||
``` | ||
|
||
## Documentation | ||
|
||
Ragna uses Sphinx to build it's documentation. | ||
|
||
You can contribute to the documentation at `docs/source`, | ||
and start a development build that auto-refreshes on new changes with: | ||
|
||
```bash | ||
sphinx-autobuild docs/source docs/build/html | ||
``` | ||
|
||
which serves the docs website at [http://127.0.0.1:8000](http://127.0.0.1:8000). | ||
* Setup: [docs/community/contribute.md](docs/community/contribute.md) | ||
* Quickstart: [docs/get-started.md](docs/get-started.md#minimal-example) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Brand guidelines |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Contribute to Ragna | ||
|
||
<!-- TODO: expand and add more narration --> | ||
|
||
## Fork and clone the repository | ||
|
||
```bash | ||
git clone https://github.com/<your-username>/ragna.git | ||
``` | ||
|
||
## Set up development environment | ||
|
||
Create and activate a conda environment: | ||
|
||
```bash | ||
conda env create --file environment.yaml | ||
conda activate ragna-dev | ||
``` | ||
|
||
## Contribute code | ||
|
||
Install Ragna in editable mode: | ||
|
||
```bash | ||
pip install --editable '.[complete]' | ||
``` | ||
|
||
Verify your installation: | ||
|
||
```bash | ||
ragna --version | ||
ragna ls | ||
``` | ||
|
||
## Contribute documentation | ||
|
||
Ragna uses MkDocs to build it's documentation. | ||
|
||
You can contribute to narrative documentation at `docs/`, | ||
and configure the docs website using `mkdocs.yml` | ||
|
||
To start a development build that auto-refreshes on new changes, | ||
run the following from the root directory: | ||
|
||
```bash | ||
mkdocs serve | ||
``` | ||
|
||
This serves the docs website at [http://127.0.0.1:8000](http://127.0.0.1:8000). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# What is RAG? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Get started | ||
|
||
## Installation | ||
|
||
<!-- TODO --> | ||
|
||
|
||
## Minimal example | ||
|
||
```python | ||
import asyncio | ||
|
||
from ragna import Rag | ||
from ragna.assistant import RagnaDemoAssistant | ||
from ragna.source_storage import RagnaDemoSourceStorage | ||
|
||
|
||
async def main(): | ||
rag = Rag() | ||
|
||
path = "ragna.txt" | ||
with open(path, "w") as file: | ||
file.write("Ragna is an OSS RAG app with Python and REST API.\n") | ||
|
||
async with await rag.new_chat( | ||
documents=[path], | ||
source_storage=RagnaDemoSourceStorage, | ||
assistant=RagnaDemoAssistant, | ||
) as chat: | ||
print(await chat.answer("What is Ragna?")) | ||
|
||
|
||
# This is only needed when running module as script. | ||
# If inside a notebook, the code inside the main function can be run directly. | ||
if __name__ == "__main__": | ||
asyncio.run(main()) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
# Ragna | ||
--- | ||
title: Welcome | ||
--- | ||
|
||
<!-- The following description is not final and likely to change. --> | ||
# Ragna | ||
|
||
Ragna is a toolkit for building RAG-based LLM applications. | ||
A toolkit for building RAG-based LLM applications, it provides: | ||
|
||
It provides: | ||
* **Python API** for RAG orchestration | ||
* **REST API** for building web applications | ||
* **Ready-to-use web application** with UI for uploading documents, selecting models, and chat interface. | ||
|
||
<!-- TODO: | ||
- Update description | ||
- Link to relevant sections of the docs | ||
--> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Release notes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# CLI reference |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Python API reference |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# REST API reference |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Use the Python API |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Explore the REST API |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Set up a web application |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
site_name: Ragna | ||
theme: | ||
name: material | ||
features: | ||
- navigation.sections |